이 기사는 ASP를 사용하여 QQ 온라인 쿼리 기능을 구현하도록 소개합니다. QQ 온라인 쿼리에 관심이있는 친구는이 기사를 참조 할 수 있습니다.
이 기사에서 귀하와 공유되는 QQ 온라인 쿼리 기능 코드는 매우 간단하며 특정 콘텐츠는 다음과 같습니다.
이 프로그램의 방법은 XMLHTTP를 사용하여 해당 HTML Code of Tencent 웹 사이트를 읽고 QQ 아바타를 얻는 것입니다.
- scriptLanguage = javaScript >
- <!-
- functiongetfaceimg (qqcode)
- {
- varre = newRegexp (^[1-9] {1}/d+$, g);
- if (! qqcode! re.test (qqcode)) 리턴;
- varurl = http : //search.tencent.com/cgi-bin/friend/oicq_find? oicq_no =+qqcode;
- varhttp = newActivexObject (microsoft.xmlhttp);
- http.open (get, url, false ,,);
- http.setrequestheader (content-type, text/html; charset = gb2312);
- http.send ();
- if (http.status! = 200) 반환;
- varwebstr = http.responsetext;
- re = newRegexp ((http://img.tencent.com/face/ [^]+), ig);
- if (Re.test (Webstr))
- return href = http : //search.tencent.com/cgi-bin/friend/user_show_info? ln =+qqcode+target = _blanktitle = qq :+qqcode+> < imgsrc =+regexp. $ 1+width = 16border = 16border = 0 ></a>;
- http = null;
- }
- document.write (내 QQ 상태 : +getfaceimg (44723461));
- //- >
- </스크립트 ipt
위의 것은이 기사에 관한 모든 것입니다. 나는 당신이 그것을 좋아하기를 바랍니다.