Code tìm mã MD5 trong php
Mình tìm được cái này. Thấy hữu ích share cho ae.
Index.php
Mình tìm được cái này. Thấy hữu ích share cho ae.
Index.php
- Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8;"/>
<script language="javascript">
function getAJAX(){
var xmlhttp;
if (window.ActiveXObject) {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
else if (window.XMLHttpRequest){xmlhttp = new XMLHttpRequest();}
return xmlhttp;
}
function xuli(){
var =text=document.getElementById("text");
store=document.getElementById("divNAV").innerHTML;
http=new getAJAX();
http.open("POST","xuli.php",true);
http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
http.onreadystatechange=function(){
if (http.readyState==4){
document.getElementById("divNAV").innerHTML=http.responseText;
}}
http.send("text="+text.value);
}
function trolai(){
document.getElementById("divNAV").innerHTML=store;
}
</script>
<body>
<center><h2>Chương trình tìm mã MD5 đơn giản</h2></center>
<div id="divNAV" align="center">
<b>Nhập vào chuỗi cần chuyển sang MD5:</b> 
<input type="text" id="text"/>
<input type="button" onclick="xuli()" value="Xử lí"/>
</div>
</body></head></html>
xuli.php
function getAJAX(){
var xmlhttp;
if (window.ActiveXObject) {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
else if (window.XMLHttpRequest){xmlhttp = new XMLHttpRequest();}
return xmlhttp;
}
function xuli(){
var =text=document.getElementById("text");
store=document.getElementById("divNAV").innerHTML;
http=new getAJAX();
http.open("POST","xuli.php",true);
http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
http.onreadystatechange=function(){
if (http.readyState==4){
document.getElementById("divNAV").innerHTML=http.responseText;
}}
http.send("text="+text.value);
}
function trolai(){
document.getElementById("divNAV").innerHTML=store;
}Chương trình tìm mã MD5 đơn giản
Nhập vào chuỗi cần chuyển sang MD5: 
- Code:
<?php
echo("<b>Mã MD5 của chuỗi vừa nhập là:</b> ".md5($_POST["text"]));
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8;"/>
<input type="button" onclick="trolai()" value="Trở lại"/>