<%
Dimact, iflogin, loginurl, loginacturl, logindata, fileurl, nome do arquivo
ato = request.QueryString ("Act")
if (Act = "Do") então
ifLogin = cint (request.QueryString ("iflogin"))
loginacturl = request.form ("loginacturl")
logindata = request.form ("Logindata")
fileurl = request.form ("fileurl")
nome do arquivo = mid (fileurl, instrumv (fileurl, "/")+1)
extpos = Instrrev (nome do arquivo, "?")
if (extpos> 0) então
nome do arquivo = esquerda (nome do arquivo, extpos-1)
endif
if (iflogin = 1) então
calposthttppage (loginacturl, logindata)
endif
calldownloadfile (fileurl, nome do arquivo)
outro
%>
<formname = "form1" método = "post" action = "? Act = do">
<p> 是否登录:
<inputName = "ifLogin" type = "radio" value = "1">
是
<inputName = "ifLogin" type = "Radio" value = "0" verificado>
否 </p>
<p> 登录提交地址:
<inputName = "LoginactURL" type = "text" size = "50">
</p>
<p>
登录数据 : <inputName = "logindata" type = "text" size = "50">
</p>
<p>
要保存的远程文件 URL:
<inputName = "fileurl" type = "text" size = "50">
</p>
<p>
<inputType = "submeter" name = "submeter" value = "提交">
<inputtype = "reset" name = "submit2" value = "重写">
</p>
</morm>
<%
endif
FunctionByTestobstr (corpo, código)
DIMOBJSTREAM
setobjstream = server.createObject ("adodb.stream")
objstream.type = 1
objstream.mode = 3
objstream.open
objstream.writebody
objstream.Position = 0
objstream.type = 2
objstream.charset = código
Bytestobstr = objStream.readText
objstream.close
setobjstream = nada