
getHTML
By:
blonkm on
Apr 17th, 2012 | syntax:
ASP | size: 0.67 KB | hits: 30 | expires: Never
Function getHTML (strUrl)
Dim xmlHttp
Dim parts
Dim resource
Dim querystring
queryString = ""
resource = strUrl
if instr(strUrl, "?")>0 then
parts = split(strUrl, "?")
resource = parts(0)
queryString = parts(1)
end if
Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP.3.0")
xmlHttp.Open "GET", resource, False
xmlHttp.setRequestHeader "Cache-Control", "no-cache"
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "content-type", "application/x-www-form-urlencoded"
xmlHttp.Send (queryString)
getHTML = xmlHttp.responseText
xmlHttp.abort()
set xmlHttp = Nothing
End Function