Share a section of the use of PHP to achieve QQ login code, the principle is to use Curl analog send post login, cookies save local, realize the real 3GQQ landing. Here code theory can support permanent single hanging qq-really do free hanging qq OH.
<?php
function Qqlogin () {
$qqno = ' Fill in QQ account here ';
$QQPW = ' Here fill in 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 ',
);
$url = ' Http://pt.3g.qq.com/handleLogin?aid=nLoginHandle&sid=ATAll43N7ZULRQ5V8zdfojol ';//request URL
$curl = Curl_init ();
curl_setopt ($curl, Curlopt_header, 0);
curl_setopt ($curl, Curlopt_url, $url);
curl_setopt ($curl, Curlopt_returntransfer, 1);
curl_setopt ($curl, Curlopt_cookiejar, $cookie);
// ? Cookie
curl_setopt ($curl, Curlopt_post, 1);
curl_setopt ($curl, Curlopt_postfields, Http_build_query ($post));
$result = curl_exec ($curl);
Curl_close ($curl);
>
qqlogin ();
How to see if login succeeded:
After running this code, your QQ will be squeezed out, pop-up the following prompts, this time you can log on to your other QQ number to see your test number landing status.