PHP Simulation QQ Login method, PHP simulation Login
This article describes the PHP simulation method of QQ login. Share to everyone for your reference. The implementation method is as follows:
The principle is to use curl to simulate sending post logins, cookies to save local
This can theoretically support the permanent single-hanging QQ
<?php//http://blog.qita.in Non-technical [s.t] $qqno = ' your qq '; $QQPW = ' qq password '; $cookie = DirName (__file__). ' /cookie.txt '; $post = Array ( ' login_url ' = ' http://pt.3g.qq.com/s?sid=ATAll43N7ZULRQ5V8zdfojol&aid= ') Nlogin ', ' q_from ' = ', ' logintitle ' = ' login ', ' bid ' = ' 0 ', ' qq ' = ' $qqno, ' pwd ' =& Gt $QQPW, ' logintype ' = ' 1 ', ' loginsubmit ' = ' login ', '; $curl = Curl_init (' http://pt.3g.qq.com/ Handlelogin?aid=nloginhandle&sid=atall43n7zulrq5v8zdfojol '); curl_setopt ($curl, Curlopt_header, 0); Curl_ Setopt ($curl, Curlopt_returntransfer, 1); curl_setopt ($curl, Curlopt_cookiejar, $cookie); // ? Cookiecurl_setopt ($curl, Curlopt_post, 1); curl_setopt ($curl, Curlopt_postfields, Http_build_query ($post)); $result = Curl_exec ($curl); Curl_close ($curl);? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1039194.html www.bkjia.com true http://www.bkjia.com/PHPjc/1039194.html techarticle PHP Simulation QQ login method, PHP simulation Login This article describes the PHP simulation QQ login method. Share to everyone for your reference. The implementation method is as follows: The principle is to use curl simulation send ...