影音先锋男人资源av站_狠狠色综合激情丁香五月_爱爱爱爱看视频_在线播放免费人成视频在线观看_少妇人妻综合久久中文字幕_国产午夜无码精品免费看_久久久久久夜精品精品免费啦_男人女人午夜视频免费_日本xxxx裸体xxxx_丰满人妻熟妇乱又仑精品

電子科大論壇-非清水河畔

標(biāo)題: 返回一個(gè)ASP頁(yè)面執(zhí)行后的靜態(tài)HTML代碼 [打印本頁(yè)]

作者: songlai    時(shí)間: 2007-12-1 14:52
標(biāo)題: 返回一個(gè)ASP頁(yè)面執(zhí)行后的靜態(tài)HTML代碼
用這個(gè)獲取頁(yè)面內(nèi)容,然后用郵件發(fā)出去!下面是遠(yuǎn)程獲取內(nèi)容的代碼
content=getHTTPPage("http://www.google.net")
response.write content
function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Msxml2.XMLHTTP")
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

來源于北京教育招生網(wǎng)




歡迎光臨 電子科大論壇-非清水河畔 (http://www.hallmarkedu.com/) Powered by Discuz! X3.4