This article describes how to use XMLHTTP to obtain the web access header information and analyze the sample code of the web page. it has some reference value. let's take a look at it.
XMLHTTP obtains web access header information and sample code analysis of web pages
<% Function BytesToBstr (body, Cset) dim objstream set objstream = Server. createObject ("adodb. stream ") objstream. type = 1 objstream. mode = 3 objstream. openobjstream. write body objstream. position = 0 objstream. type = 2 objstream. charset = Cset BytesToBstr = objstream. readText objstream. close set objstream = nothingEnd Function url = request. form ("url") if trim (url) <> "then set xml = Server. createObject ("MSXML2.XMLHTTP. 5.0 ") xml. open "GET", url, False xml. send bo = BytesToBstr (xml. responseBody, "UTF-8") header = xml. getAllResponseHeaders set xml = nothingend if %> XMLHTTP test
<% = Header %> |
<% = Bo %> |
The above is the details of XMLHTTP's web access header information and webpage sample code analysis. For more information, see other related articles in the first PHP community!