<%
if request.QueryString("action")="ok" then
dim kk,url,http,reurl
url =trim(request.Form("url"))
if url="" then
url="http://www.dushan.net.cn"
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(120)&"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('发布成功');"
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">要转静态的网址:</span></td><td><input name="url" type="text" id="url" value="http://www.dushan.net.cn" />
<span class="STYLE1">例如http://www.dushan.net.cn 本机的文件 http://localhost/</span></td>
</tr>
<tr><td><span class="STYLE2">存放的路径:</span></td><td>
<input name="ad" type="text" id="ad" value="index.html"/>
<span class="STYLE1">比如index.html 就是保存为和本文件同一目录下的一个index.html</span></td>
</tr>
<tr>
<td><span class="STYLE2">转静态后需要跳转到:</span></td>
<td>
<input name="reurl" type="text" id="reurl" value="index.html" />
<span class="STYLE1">转静态完成后会有提示框然后确定后就转到您填写的页面</span></td>
</tr>
<tr><td><div align="right">
</div></td><td><input type="submit" name="Submit" value="提交" /></td>
</tr></table>
</form>
<%end if%>
<span class="STYLE1">本文件可以随便改名不影响运行</span>
|