| 以下为引用的内容:
源代码网整理以下 <% private function bytes2bstr(vin)
源代码网整理以下 dim i, thischrcode, nextchrcode strreturn = "" for i = 1 to lenb(vin)
源代码网整理以下 thischrcode = ascb(midb(vin, i, 1))
源代码网整理以下 if thischrcode < !amp;h80 then strreturn = strreturn !amp; chr(thischrcode)
源代码网整理以下 else nextchrcode = ascb(midb(vin, i + 1, 1))
源代码网整理以下 strreturn = strreturn !amp; chr(clng(thischrcode) * !amp;h100 + cint(nextchrcode))
源代码网整理以下 i = i + 1 end if next bytes2bstr = strreturn end function function geturl(url)
源代码网整理以下 set retrieval = server.createobject("microsoft.xmlhttp")
源代码网整理以下 with retrieval。open "get", url, false, "", ""。send geturl = .responsetext geturl = bytes2bstr(。responsebody)
源代码网整理以下 end with set retrieval = nothing end function
源代码网整理以下 以上是使用xmlhttp读取页面代码的通用代码
源代码网整理以下 function getalexarank(url)
源代码网整理以下 on error resume next dim tempstr,trueurl,x,keystr
源代码网整理以下 trueurl = "http://www.alexa.com/data/details/traffic_details@q=!amp;url=" !amp; url tempstr=geturl(trueurl)
源代码网整理以下 keystr = "</td><td class=""bodybold"" align=""center"" bgcolor=""#ffffff""><img" tempstr = split(tempstr,keystr)(0)
源代码网整理以下 x = instrrev(tempstr,">") + 1 tempstr = mid(tempstr,x)
源代码网整理以下 if err then getalexarank=err.description err.clear else getalexarank=tempstr end if end function
|