<%
hps=50

HTMLname1_cn="/cn_html"
HTMLname2_cn="/cn_asp/"
HTMLname3_cn="cn_"

HTMLname1_en="/en_html"
HTMLname2_en="/en_asp/"
HTMLname3_en="en_"

HTMLname1_utf="/utf_html"
HTMLname2_utf="/utf_asp/"
HTMLname3_utf="utf_"

Function htmll(mulu,htmlmulu,FileName,filefrom,htmla,htmlb,htmlc,htmld)
if mulu="" then mulu="/"
if htmlmulu="" then htmlmulu="/"
mulu=replace(SysRootDir&mulu, "//", "/")
htmlmulu=replace(SysRootDir&htmlmulu, "//", "/")

FilePath=Server.MapPath(mulu)&"\"&FileName
Do_Url="http://"
Do_Url=Do_Url&Request.ServerVariables("server_name")&htmlmulu&filefrom
Do_Url=Do_Url&"?"&htmla&htmlb&"&"&htmlc&htmld
strUrl=Do_Url

set objXmlHttp=Server.createObject("Microsoft.XMLHTTP")
'Set objXmlHttp=Server.CreateObject("MSXML2.XMLHTTP.4.0") 
'On Error Resume Next 
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
binFileData=objXmlHttp.responseBody

On Error Resume Next 
If objXmlHttp.Status<>200 then

'responseText：将返回消息作为文本字符串；
'responseBody：将返回消息作为HTML文档内容；
'responseXML：将返回消息视为XML文档，在服务器响应消息中含有XML数据时使用；
'responseStream：将返回消息视为Stream对象

Set objXmlHttp=Nothing
end if

set objAdoStream=Server.CreateObject("Adodb." & "Stream")
objAdoStream.Type=1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
set objAdoStream=nothing
End Function
%>