I don’t know if you are very familiar with MSXML2. It obtains a QQ number's avatar and online status from the Tencent website (I can't help it even if the person is invisible). Of course, you can also obtain the QQ nickname, location, etc. The specific implementation method is as follows:
First create two functions, use To process a URL
<%
function getHTTPPage (url)
dim http
set http=createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate< ;>4 then >end function
''''''''The following characters are processed
Function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i 1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 CInt(NextCharCode))
i = i 1
End If
Next
bytes2BSTR = strReturn
End Function
%>
You can collect these two functions, they are extremely useful.
You can take a look at this address http: //friend.qq.com/cgi-bin/friend/oicq_find?oicq_no=5292816
(QQ belongs to me, I am very busy every day, please be aware, hehe, discussion of issues is very welcome)
The following we Get information through Tencent’s friend search,
Copy code
The code is as follows:
content=replace(mid(content,instr(content,"http://img.tencent.com"),38 ),"""","")
qqhead="
"
else
qqhead=""
end if
end function
'OK, you're done. Now everyone just needs to call it.
response.write qqhead(5292816)
If the QQ avatar is in color, it means that the friend is online. The gray one means it is not online.
%>
You can go to http://www.okwest.net/books to see the effect. Haha.