当前位置: 移动技术网 > IT编程>开发语言>.net > 返回远程动态页面执行后的静态HTML代码

返回远程动态页面执行后的静态HTML代码

2018年10月07日  | 移动技术网IT编程  | 我要评论

工作经历证明怎么写,左井林,世纪苗木网

  想返回远程动态页面执行后的静态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

技术交流 永无止境

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网