ASP uses XMLHTTP to generate static Web pages from dynamic Web pages

Source: Internet
Author: User
xml| Dynamic | static | Web News system, blog system and so on may use the dynamic page to generate static page skills to improve the page's access speed.   Here is a simple piece of code that uses XMLHTTP to generate a static web page from a Dynamic Web page. url = "http://www.csdn.net/"
Set Http=server.createobject ("Msxml2.xmlhttp")
Http.open "Get", Url,false
Http.send ()
Set objstream = Server.CreateObject ("ADODB. Stream ")
objStream.Type = 1
objStream.Open
Objstream.write Http.responsebody
Objstream.savetofile Server.MapPath ("Example.htm"), 2
objStream.Close

Response.Write "Generate static Web Success!" Browse generated pages "

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.