This program can only turn the homepage into static! (True to one page)
Upload the createhtml.asp file to your space to store the first file (index.asp) in the directory
Enter the URL directly open createhtml.asp to the prompt operation on it
If no success can be createhtml.asp renamed try (such as: Change to z.asp) input URL directly open z.asp
This document can be renamed without affecting the operation
Copy Code code as follows:
<%
If request. QueryString ("action") = "OK" then
Dim Kk,url,http,reurl
URL =trim (Request. Form ("url")
If Url= "" Then
Url= "Http://www.jb51.net"
End If
Kk=trim (Request. Form ("ad")
If kk= "" Then
kk= "Index.html"
End If
Reurl=trim (Request. Form ("Reurl"))
Set Http=server.createobject ("Microsoft." &CHR (& "Mlhttp")
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 (KK), 2
Response.Write "<script language= ' JavaScript ' >"
Response.Write "Alert (' Publish Success ');"
Response.Write "Location.href= '" &reurl& "';"
Response.Write "</script>"
Else
%>
<style type= "Text/css" >
<!--
. STYLE1 {
font-size:12px;
Color: #FF0000;
}
. STYLE2 {
Color: #0000FF;
font-size:12px;
}
-->
</style>
<form id= "Form1" Name= "Form1" "method=" Post "action=" http://<%=request. ServerVariables ("Http_host") &request. ServerVariables ("Script_name")%>?action=ok ">
<table><tr><td>
<span class= "STYLE2" > to a static URL: </span></td><td><input name= "url" type= "text" id= "url" Value= "Http://www.jb51.net"/>
<span class= "STYLE1" > For example http://www.jb51.net native files http://localhost/</span></td>
</tr>
<tr><td><span class= "STYLE2" > Storage path:</span></td><td>
<input name= "ad" type= "text" id= "ad" value= "index.htm"/>
<span class= "STYLE1" > such as index.html is saved as a index.html</span></td> in the same directory as this file
</tr>
<tr>
<td><span class= "STYLE2" > Turn to static after the need to jump to:</span></td>
<td>
<input name= "Reurl" type= "text" id= "Reurl" value= "index.htm"/>
<span class= "STYLE1" > after the static, there will be a reminder box and then go to the page you completed </span></td>
</tr>
<tr><td><div align= "Right" >
</div></td><td><input type= "Submit" name= "Submission" value= "submitted"/></td>
</tr></table>
</form>
<%end if%>
<span class= "STYLE1" > This document can be renamed without affecting running </span>