Recommended: Useful client functions for silently submitting forms The client is subject to the form of Microsoft.XMLHTTP to submit data without refreshing. The following is the referenced content: <SCRIPT LANGUAGE=vbScript> dim i,strR
(I) Principle
The thief program actually calls web pages on other websites through the XMLHTTP component in XML. For example, in the news thief program, many of them call Sina's news pages, and some replacements are made to the html in it, and the advertisements are also filtered. The advantages of using a thief program are: there is no need to maintain the website, because the data in the thief program comes from other websites, and it will be updated as the website is updated; it can save server resources. Generally, the thief program only has a few files, and all web page content comes from other websites. Disadvantages include: unstable. If the target website errors, the program will also be errored. Moreover, if the target website is upgraded and maintained, the thief program must also be modified accordingly. The speed is because it is a remote call, and the speed is definitely slower than reading data on the local server.
(II) Example
Here is a brief explanation of the application of XMLHTTP in ASP
'Common functions
'1. Enter the URL destination web page address, and the return value getHTTPPage is the html code of the destination web page
| function getHTTPPage(url) dim Http set Http=server.createobject(MSXML2.XMLHTTP) Http.open GET,url,false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage=bytesToBSTR(Http.responseBody,GB2312) set http=nothing if err.number<>0 then err.Clear end function |
Share: ASP tips: Five ways to disable page caching 1. Add the following referenced content at the head of the Asp page: Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Resp
2 pages in total Previous page 12 Next page