XMLHTTP thief program principle

xiaoxiao2021-04-03  237

Principles and simple examples: 2004-4-13 164720 Source: Your Bokey.com (YourBlog.org) Now there are more popular thieves, there are news thieves, music thieves, download thieves, how do they do , Let me be a brief introduction, I hope to help the webmasters. (1) The principle thief program is actually invoked by the XMLHTTP components in XML to call the webpage on other websites. For example, the news thief program, many of them call the Sina's news page, and some replacements are made, and the advertisements have also been filtered. The advantages of the thief program are: No need to maintain the website, because the data in the thief program is from other websites, which will be updated with the update of the site; save server resources, general thief procedures, all web content is From other websites. Disadvantages: Unstable, if the target website is wrong, the program will make an error, and if the target website is upgraded, then the thieves should be modified accordingly; speed, because it is remote call, speed, and read data on the local server Compared to, it must be slower. (II) The following is a brief explanation of XML related technical information XMLHTTP technology in the application of XMLHTTP in ASP -------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------- First, the database remote management technology is an important part of the Internet-based wide area network modern application is the database remote. monitor. First, simply review the development process and way of database remote management technology on the Internet: Early Database remote management by writing CGI-BIN program modules. However, CGI-BIN has slowed down and maintenance is very inconvenient. It has now been basically discarded. In these years, there are many applications that use the component object model (Component Object Model, COM), and the effect is also very good. However, if you are using a third-party server (the author's website is on the virtual host of third parties), the server side often does not allow users to register their own components because confidential or other business reasons. In recent years, the J2EE platform of the .NET platform and Sun companies have been launched by Microsoft, are very high-grade database remote management and service platforms. It can provide quality multi-tier (N-Tier) applications. Among them, .NET's simple object access protocol (SOAP) implements cross-systems (such as Windows - Linux) using hypertext transfor protocol, http and extended markers (XML) technology (such as Windows - Linux) Communication service is widely accepted and used by developers. Many large applications, such as Enterprise Resource Planning, ERP, etc. are built on such large platforms. But for small and medium-sized applications, such as a website construction and maintenance, this large-scale application platform seems to be big and the overhead is too large. We have been in front of XML application development in Internet Technology and Java technology. The XMLHTTP protocol in her XML parser (MSXML) is a very convenient and practical customer service communication pipe. Comprehensive use of XMLHTTP and ActiveX data objects (AntiveX Data Objects, ADOADOX) can easily easily implement database remote management. This article describes how to comprehensively use XMLHTTP and ADOADOX for remote database management. Second, the database remote management system database remote management task process is: 1. The client issues a database structure and data query or modification instruction to the server. 2, the server accepts and executes the relevant instructions and returns the result to the client. 3, the client accepts and displays the execution result of the instruction returned by the server.

Two major key links to implement database remote management are: 1. Directive upload and result of the client and the server implementation of the data channel, implemented by the XMLHTTP protocol. 2. The command transfer and results between the frontier frontier and the database are returned, and the ADOADOX interface acting as an intermediate layer is completed. Third, the use of XMLHTTP, XMLHTTP is a hypertext transport protocol that transmits XML format data. In fact, XMLHTTP's data transmission process is more flexible: it uploaded instructions can be XML format data, or a string, stream, or an unsigned integer array. It can also be the parameter of the URL. The result of it can be XML format data, or a string, stream, or an unsigned integer array. Details can be found in the literary link. The process of client calling XMLHTTP is simple, only 5 steps: 1. Create XMLHTTP object 2, open the connection with the server, and define instruction sending mode, service web page (URL), and request permissions. The client opens the connection to the server's service web page via the Open command. Like normal HTTP instructions, you can use a GET method or a POST method to point to the server's service web page. 3, send the instruction. 4, waiting and receive the processing result returned by the server. 5. Release XMLHTTP object XMLHTTP method: Open BSTRMETHOD, BSTRURL, Varasync, BStruser, BSTRPASSWORD BSTRMETHOD: Data transfer mode, GET or POST. BSTRURL: The URL of the service web page. Varasync: Whether to perform synchronously. The default is true, ie synchronous execution, but can only implement synchronous execution in the DOM. It is generally set to False, which is performed asynchronously. BSTRUSER: User name, can be omitted. BSTRPASSWORD: User password, can be omitted. Send Varbody Varbody: Instruction Set. Can be XML format data, or a string, stream, or an unsigned integer array. It can also be omitted, and the instruction will be submitted through the URL parameter of the OPEN method. setRequestHeader bstrHeader, bstrvalue bstrHeader: HTTP header (header) bstrValue: value of the HTTP header (header) is defined as the Open method if POST, can upload the form defined manner: xmlhttp.setRequestHeader Content-Type, applicationx-www-form-urlencoded XMLHTTP properties: OnReadyStateChange: The event handle of the return result is obtained in the synchronous execution mode. Can only be called in the DOM. ResponseBody: Results Returns to an unregulated integer array. ResponseStream: The result is returned to the ISTREAM stream. ResponseText: The result is returned to a string. Responsexml: The result is returned to XML format data. The following is an example of application source attachment article: Function GetResult (urlStr) Dim xmlHttp Dim retStr Set xmlHttp = CreateObject (Msxml2.XMLHTTP 'Create Object On Error Resume Next' error handling xmlHttp.Open POST, urlStr, False 'with a POST Way open connection and execute asynchronously.

转载请注明原文地址:https://www.9cbs.com/read-131531.html

New Post(0)