返回远程动态页面执行后的静态HTML代码
想返回远程动态页面执行后的静态html代码然后用邮件发出去!下面是远程获取内容的代码:
content=gethttppage("https://www.google.net")
response.write content
function gethttppage(url)
on error resume next
dim http
set http=server.createobject("msxml(标准化越来越近了)2.xml(标准化越来越近了)http")
http.open "get",url,false
http.send()
if http.readystate<>4 then exit function
gethttppage=bytes2bstr(http.responsebody)
set http=nothing
if err.number<>0 then err.clear
end function
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
技术交流 永无止境
上一篇: 耳朵经济爆发!音频内容创业者的春天来了
下一篇: 什么牌子的绿茶好?怎么挑选好的绿茶?