The newest website hangs QQ code (PHP,ASP,JS)

Source: Internet
Author: User
Tags copy
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>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.