[PHP代码]PHP查询QQ电脑在线状态
<?php if ($_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号
曹杰峰》原创,转载请保留文章出处。
本文链接:https://www.caojiefeng.com/php/101.html
版权声明:若无特殊注明,本文为《正文到此结束
发表吐槽
你肿么看?
既然没有吐槽,那就赶紧抢沙发吧!