//论坛api登录接口地址 $uri = http//www.wap.com/ssdfasdfsf //参数数组 $data = array( 'username' => 'username', 'password' => 'password', ); //操作执行 $ch = curl_init(); curl_setopt($ch, curlopt_url, $uri); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_header,1); curl_setopt($ch, curlopt_postfields, $data); curl_exec($ch);
复制代码
统一两天的sessionid产生机制,改造论坛wap用户验证方法。
二、用php实现qq挂机的程序
现时qq挂机十分流行,最近看到某位高人写了这样一段php代码实现qq挂机,特拿出来与各位分享一下。
网管u家u.bitscn.comphp代码:
$qq = 100000; //qq号码$pwd = 123456; //密码$ch = curl_init();curl_setopt($ch, curlopt_url, http://211.139.167.71/waptest/twf/qqportal/rela/updateuserinfo.jsp);curl_setopt($ch, curlopt_followlocation, 1); //这行是设定curl是否跟随header发送的location,重要curl_setopt($ch, curlopt_post, 1);//curl_setopt($ch, connection, keep-alive);curl_setopt($ch, curlopt_returntransfer,1);curl_setopt($ch, curlopt_postfields, qq=.$qq.&pwd=.$pwd.&fromwhere=register);$return = curl_exec($ch);curl_close($ch);echo strstr($return, postfield) ? 登录失败 : 登录成功;?>
复制代码
注解:1、需curl模块支持2、登陆后,你的好友将会看到你在线 3、不知道如何下线。