利用ASP脚本写个检测指定网站中是否有指定的字符然后再执行相应的脚本

来源:百度知道 编辑:UC知道 时间:2024/06/17 06:51:05
我是新手请写上注释谢谢!
比如我要检测的网址ASP变量是rs("homepage")=homepage 那该怎么写还有我调用了怎么一点反应都没?

microsoft.xmlhttp可以实现

private function bytes2bstr(vin) '字符串函数
dim i, thischrcode, nextchrcode
strreturn = ""
for i = 1 to lenb(vin)
thischrcode = ascb(midb(vin, i, 1))
if thischrcode < &h80 then
strreturn = strreturn & chr(thischrcode)
else
nextchrcode = ascb(midb(vin, i + 1, 1))
strreturn = strreturn & chr(clng(thischrcode) * &h100 + cint(nextchrcode))
i = i + 1
end if
next
bytes2bstr = strreturn
end function

function geturl(url)
On Error Resume Next
set retrieval = server.createobject("microsoft.xmlhttp")
with retrieval
.open "get", url, false, "", ""