代码 <?php if ($_GET
代码
<?phpif ($_GET['qq']) {$qq = $_GET['qq'];$data = file_get_contents("http://webpresence.qq.com/getonline?type=1&$qq:");$data || $data = strlen(file_get_contents("http://wpa.qq.com/pa?p=2:$qq:45"));if(!$data) { return 0; } switch((string)$data){ case 'online[0]=0;': exit('{"code":"0","state":"电脑离线"}');return; case 'online[0]=1;': exit('{"code":"1","state":"电脑在线"}') ;return; } } return 3;?>
说明
调用地址: www.xxx.com/xx.php?qq=QQ号
如果觉得有用,自行搭建,自行测试(反正久伴是测试OK的)