The homepage is automatically generated by template.
I am afraid I have forgotten it.
<%
Response. expires = 0
Response. expiresabsolute = now ()-1
Response. addheader "Pragma", "No-Cache"
Response. addheader "cache-control", "private"
Response. cachecontrol = "no-Cache"
Response. Buffer = true
Response. Clear
Server. scripttimeout = 999999999
On Error resume next
'*************************************** ************************
'* Defines the function for reading the homepage from a template
'* Description: The template file name is index_template.asp.
'*************************************** ************************
Function getpage (URL)
Set retrieval = Createobject ("Microsoft. XMLHTTP ")
With Retrieval
. Open "get", URL, false ,"",""
. Send
Getpage = bytestobstr (. responsebody)
End
Set retrieval = nothing
End Function
Function bytestobstr (Body)
Dim objstream
Set objstream = server. Createobject ("ADODB. Stream ")
Objstream. type = 1
Objstream. mode = 3
Objstream. Open
Objstream. Write body
Objstream. Position = 0
Objstream. type = 2
Objstream. charset = "gb2312"
Bytestobstr = objstream. readtext
Objstream. Close
Set objstream = nothing
End Function
'*************************************** ************************
'* Homepage, file name: default.htm
'*************************************** ************************
Dim tstr
Tstr = getpage ("http://www.adhome.net/index_Template.asp ")
Set FSO = server. Createobject ("scripting. FileSystemObject ")
Set fout = FSO. createtextfile (server. mappath (".") & "/default.htm ")
Fout. Write tstr
Fout. Close
Response. Write "<SCRIPT> alert (" "The homepage is generated successfully! /N file name: default.htm ""); location. href = "http://www.adhome.net"; </SCRIPT>"
Response. End
%>