PHP simulates QQ logon, and php simulates logon. PHP simulates QQ logon. php simulates logon. This article describes how PHP simulates QQ logon. Share it with you for your reference. The specific implementation method is as follows: the principle is to use curl to simulate sending PHP simulated QQ login methods, php simulated login
This article describes how to simulate QQ login in PHP. Share it with you for your reference. The specific implementation method is as follows:
The principle is to use curl to simulate post login, and the cookie is saved locally.
This theoretically supports permanent single-stick 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' => $ qqpw, 'logintype' => '1', 'loginsubmit '=> 'login ',); $ curl = curl_init ('http: // pt.3g.qq.com/handleLogin? Aid = nLoginHandle & sid = comment '); curl_setopt ($ curl, CURLOPT_HEADER, 0); curl_setopt ($ curl, expires, 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 will help you with php programming.
Examples in this article describe how to simulate QQ login in PHP. Share it with you for your reference. The specific implementation method is as follows: the principle is to use curl to simulate sending...