标题: QQ空间留言源码
时间: 2014-01-30
<?php
$sids = array('AdPmYwx-I-12euFm8nFIxMXw','AWRe-dapASAyqybLgggUOBP_'); //这两个sid已经失效了哦,你懂的
$B_UID = '69504439'; //这个QQ69504439木有开通QQ空间的撒,换成开了的哈,你懂的
$msgs = array(
'刷留言中,嘿嘿,我对你好吧?',
'给你踩踩,加点人气撒!',
'低调路过,高调留言!',
'我们的口号是:进空间一定要留言!嘻嘻。',
'欢迎回访我的博客,http://messense.me,嘿嘿!',
'让哥的留言泛滥吧,无聊ing,我无聊,服务器也受罪,嘻嘻!',
'留言一定要短,长了就懒得打字鸟,飘过!',
'囧~~~囧~~~',
'只能留言十次。。。鄙视腾讯,鄙视麻花藤',
'嘿嘿,虽然手动留言更有诚意,不过这么麻烦的事还是交给机器吧,服务器跑代码比自己输入可快多了,嘻嘻~~~'
);
$success = 0;
foreach ($sids as $sid) {
for ($i = 0; $i <= 9; $i++) {
$curl = curl_init('http://blog30.z.qq.com/mmsgb/add_msg.jsp?sid=' . $sid);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_REFERER, 'http://blog30.z.qq.com/mmsgb/msg_board.jsp?sid=' . $sid);
curl_setopt($curl, CURLOPT_USERAGENT, 'Nokia1680c_CMCC/2.0 (05.61) Profile/MIDP-2.1 Configuration/CLDC-1.1 nokia1680c');
curl_setopt($curl, CURLOPT_TIMEOUT, 20);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'msg=' . urlencode($msgs[$i]) . '&sign=1&B_UID=' . $B_UID . '&entry=board&super=0');
$data = curl_exec($curl);
curl_close($curl);
unset($curl);
if (strstr($data, '成功')) {
$success++;
}else{
//break; //跳出循环,注释掉了哈
}
}
}
echo '成功发表留言', $success, '条!';
?>
『回复列表(6|隐藏机器人聊天)』