QQ Online Status Code _ Internet surfing

Source: Internet
Author: User
But Tencent's version of this page has changed, and I discovered it today. With the previous code has not been able to click to open the Chat window, the generated new code longer than before, a bit more sigkey,64 (very long).
Take my QQ as an example, the code generated on that page is as follows:
Copy Code code as follows:

<a href= "Http://sighttp.qq.com/cgi-bin/check?sigkey=cfad9f0a103b59616e94d667dd5755e92c2be98ded5ad949a940399e013adfe2"; Target=_blank; Onclick= "var tempsrc= ' http://sighttp.qq.com/wpa.js?rantime= ' +math.random () + ' &sigkey= Cfad9f0a103b59616e94d667dd5755e92c2be98ded5ad949a940399e013adfe2 '; var Oldscript=document.getelementbyid (' Testjs '); var newscript=document.createelement (' script '); Newscript.setattribute (' type ', ' text/javascript '); Newscript.setattribute (' id ', ' Testjs '); Newscript.setattribute (' src ', tempsrc); if (Oldscript = null) { Document.body.appendChild (newscript);} Else{oldscript.parentnode.replacechild (Newscript, oldscript);} return false; ></a>

Isn't it long? And so put into the Web page, then the page must not be authenticated, SRC is capitalized, and so on; Target=_blank; ”。 If you want to put several QQ, that page is also very messy. What to do?
I compared two QQ, found that only the 64-bit sigkey is not the same, so you can move the onclick out, code:
Copy Code code as follows:

<script type= "Text/javascript" >
function Qqtalk (sigkey) {
var tempsrc= ' http://sighttp.qq.com/wpa.js?rantime= ' +math.random () + ' &sigkey= ' +sigkey;
var Oldscript=document.getelementbyid (' Testjs ');
var newscript=document.createelement (' script ');
Newscript.setattribute (' type ', ' text/javascript ');
Newscript.setattribute (' id ', ' Testjs ');
Newscript.setattribute (' src ', tempsrc);
if (Oldscript = = null) {
Document.body.appendChild (Newscript);
}
else {
Oldscript.parentNode.replaceChild (Newscript, oldscript);
}
return false;
}
</script>

Then direct onclick= "return Qqtalk (' Cfad9f0a103b59616e94d667dd5755e92c2be98ded5ad949a940399e013adfe2 ');"

The code within the body of the Web page can be written as: <a href= "http://sighttp.qq.com/cgi-bin/check?sigkey= Cfad9f0a103b59616e94d667dd5755e92c2be98ded5ad949a940399e013adfe2 "target=" _blank "onclick=" return QQtalk (' Cfad9f0a103b59616e94d667dd5755e92c2be98ded5ad949a940399e013adfe2 '); " ></a>
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.