如何运用php给自己的qq好友发送消息? 10
2个回答
展开全部
<?php
header("Content-type:text/html;charset=utf-8");
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://q16.3g.qq.com/g/s?sid=你的sid"); //发贴地址
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST,true); //设置POST方式
curl_setopt($ch, CURLOPT_POSTFIELDS,"u=630803889&saveUrl=0&do=send&on=1&aid=发送&msg=你好,测试");//发送的post值
$file_contents = curl_exec($ch);//获得返回值
curl_close($ch);
?>
header("Content-type:text/html;charset=utf-8");
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://q16.3g.qq.com/g/s?sid=你的sid"); //发贴地址
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST,true); //设置POST方式
curl_setopt($ch, CURLOPT_POSTFIELDS,"u=630803889&saveUrl=0&do=send&on=1&aid=发送&msg=你好,测试");//发送的post值
$file_contents = curl_exec($ch);//获得返回值
curl_close($ch);
?>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询