Js采集代码
<script language="javascript">
<!--
function GetBody(URL)
{
var http=new ActiveXObject("Microsoft.XMLHTTP");
http.open("GET",URL,false,"","");
http.setRequestHeader("CONTENT-TYPE","text/html; Charset=gb2312");
http.send();
if (http.status!=200) return;
var webStr=http.responseText;
http=null;
return webStr;
}
QQnum="76343892:345898356:317286144"
var QQurl="http://wpa.qq.com/getonline?"+QQnum+":"
var online=new Array();/*声明数组变量*/
alert(GetBody(QQurl))
eval(GetBody(QQurl));/*转为变量alert(GetBody(QQurl))*/
for (var ii=0;ii<online.length; ii++)
{
if(online[ii])
{alert("在线")}else{alert("不在线")}
}
//-->
</script>