下面是一个通过http方式登录的例子.
代码如下:
<?php
//by:qqleyi.com
function send($post){
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://119.147.14.253:14000");
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post.PHP_EOL);
curl_setopt($ch,CURLOPT_TIMEOUT,60);//超时
curl_setopt($ch,CURLOPT_HEADER,false);
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,0);
$result=curl_exec($ch);
curl_close($ch);
return $result;
}
$r=rand(200,999);
$uin='892773019';//qq号码
$pw='123456';//登录密码
echo send('VER=1.4&CON=0&CMD=Login&SEQ='.$r.'&UIN='.$uin.'&PS='.strtoupper(md5($pw)).'&M5=1&LG=1&LC=2EC70D1101DB674F&GD=V1A5GPI7WWW7CJ8O&CKE=');
?>
//by:晨曦
function send($post){
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://119.147.14.253:14000");
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post.PHP_EOL);
curl_setopt($ch,CURLOPT_TIMEOUT,60);//超时
curl_setopt($ch,CURLOPT_HEADER,false);
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,0);
$result=curl_exec($ch);
curl_close($ch);
return $result;
}
$r=rand(200,999);
$uin='892773019';//qq号码
$pw='123456';//登录密码
echo send('VER=1.4&CON=0&CMD=Login&SEQ='.$r.'&UIN='.$uin.'&PS='.strtoupper(md5($pw)).'&M5=1&LG=1&LC=2EC70D1101DB674F&GD=V1A5GPI7WWW7CJ8O&CKE=');
?>