首页WEB开发ASP教程 → Asp编程实现QQ的在线情况查询

Asp编程实现QQ的在线情况查询

日期:2007-4-23 15:37:55 出处:其他转载 作者:不详 人气:
    <script language="JavaScript">  
  <!--  
  function getFaceImg(QQcode)  
  {  
  var Re=new RegExp("^[1-9]{1}\d+$","g");  
  if (!QQcode  !Re.test(QQcode)) return;  
  var URL="http://search.tencent.com/cgi-bin/friend/oicq_find?oicq_no="+QQcode;  
  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;  
  Re=new RegExp(""(http://img.tencent.com/face/[^"]+)"","ig");  
  if (Re.test(webStr))  
  return "<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln="+QQcode+"" target=_blank title="QQ:"+QQcode+""><img src=""+RegExp.$1+"" width=16 height=16 border=0></a>";  

  http=null;  
  }  

  document.write("我的QQ状态:"+getFaceImg("44723461"));  
  //-->  
  </script>

关于本站 | 帮 助 | 广告服务 | 版权声明 | 业务合作 | 捐助本站 | 软件发布 | 联系我们
77资源下载 www.77zy.com ©2007-2008 版权所有
备案编号:赣ICP备07002641号  QQ:674648476