标题: 自动获取好友群发消息源码
时间: 2015-01-01
<?php
header("Content-type:text/html;charset=utf-8");
$qq=$_GET["qq"];
$sid=$_GET["sid"];
function fs($sid,$qq,$nr)
{
$ch=curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_URL,"http://q32.3g.qq.com/g/s?sid={$sid}&aid=sendmsg&tfor=qq&referer=");
curl_setopt($ch,CURLOPT_POSTFIELDS,"msg={$nr}&u={$qq}&on=1&saveURL=0&do=send");
$fs = curl_exec($ch);
curl_close($ch);
return $fs;
}
echo $a=file_get_contents("http://q16.3g.qq.com/g/s?sid={$sid}&3G_UIN={$qq}&saveURL=0&new3gqq=true&aid=nqqchatMain");
preg_match("/(\d{1,})页/",$a,$c);
for($x=1;$x<=$c[1];$x++){
echo "开始发送第{$x}页<br/>";
$d=file_get_contents("http://q16.3g.qq.com/g/s?sid={$sid}&aid=nqqchatMain&on=1&p={$x}");
preg_match_all("/u=(\d{5,})/",$d,$b);
$xx=count($b[1]);
echo"发送给{$xx}个好友";
for($y=0;$y<$xx;$y++){
$msg="祝你元旦快乐!欢迎访问我网站xkgq.xyz";
$bbb=$b[1][$y];
echo fs($sid,$bbb,$msg);
sleep(1);
}
echo "<hr/>";
sleep(5);
}
?>
『回复列表(4|隐藏机器人聊天)』