Js|js Explanation: This code is suitable for you to do the website use, is a good thing!
Asp:
CODE: [Copy to Clipboard]
<%
Dim objxmlhttp, QQ, PWD
QQ = "10000"
PWD = "123456"
Set objxmlhttp = Server.CreateObject ("MSXML2. xmlhttp.5.0 ")
Objxmlhttp.open "POST", "_blank>http://211.139.167.71/waptest/twf/qqportal/rela/updateuserinfo.jsp", False
Objxmlhttp.setrequestheader "Content-type", "application/x-www-form-urlencoded"
Objxmlhttp.setrequestheader "Connection", "keep-alive"
Objxmlhttp.send ("qq=" &qq& "&pwd=" &pwd& "&fromwhere=register")
If InStr (Objxmlhttp.responsetext, "validation failed") then
Response.Write "Logon Failed"
Else
Response.Write "Login Successful"
End If
Set objxmlhttp = Nothing
%>
Php:
CODE: [Copy to Clipboard]
<php
$QQ = "100000"; QQ number
$pwd = "123456"; Password
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "_blank>http://211.139.167.71/waptest/twf/qqportal/rela/updateuserinfo.jsp");
curl_setopt ($ch, curlopt_followlocation, 1); This line is set curl whether to follow the header sent by location, important
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, "Connection", "keep-alive");
curl_setopt ($ch, curlopt_returntransfer,1);
curl_setopt ($ch, Curlopt_postfields, "qq=". $qq. " &pwd= ". $pwd." &fromwhere=register ");
$return = curl_exec ($ch);
Curl_close ($ch);
Echo strstr ($return, "Postfield")? "Login Failed": "Login succeeded";
? >
Js:
CODE: [Copy to Clipboard]
<script type= "Text/javascript"
var qq = "100000"; QQ number
var pwd = "123456"; Password
if (window. XMLHttpRequest) {
var x = new XMLHttpRequest ();
} else {
var MSXML = new Array (' MSXML2. xmlhttp.5.0 ', ' MSXML2. xmlhttp.4.0 ', ' MSXML2. xmlhttp.3.0 ', ' MSXML2. XMLHTTP ', ' microsoft.xmlhttp ');
for (var n = 0; n msxml.length n + +) {
try {
var objxmlhttp = new ActiveXObject (Msxml[n]);
Break
catch (e) {
}
}
}
Objxmlhttp.open ("POST", "_blank>http://211.139.167.71/waptest/twf/qqportal/rela/updateuserinfo.jsp", false);
Objxmlhttp.setrequestheader ("Content-type", "application/x-www-form-urlencoded");
Objxmlhttp.setrequestheader ("Connection", "keep-alive");
Objxmlhttp.send ("qq=" + QQ + "&pwd=" + pwd + "&fromwhere=register");
if (ObjXMLHTTP.responseText.indexOf ("Validation failed") > 0) {
Alert ("Login Failed");
} else {
Alert ("Equal record Success");
}
</script>