代码语言:javascript复制
<?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号
Last modification:January 12th, 2019 at 12:55 pm
© 允许规范转载