<%
dimact, iflogin, loginurl, loginactUrl, logindata, fileUrl, nombre de archivo
Act = request.QueryString ("ACT")
if (act = "do") entonces
iflogin = cint (request.querystring ("iflogin"))
loginactUrl = request.form ("LoginActUrl")
logindata = request.form ("logindata")
fileUrl = request.form ("fileUrl")
FileName = Mid (FileUrl, Instrrev (FileUrl, "/")+1)
extPOS = instrrev (nombre de archivo, "?")
if (extPos> 0) entonces
FileName = Left (nombre de archivo, extPOS-1)
endif
if (iflogin = 1) entonces
CallPOSTHTTPPAGE (LoginActURL, Logindata)
endif
CalldownloadFile (FileUrl, nombre de archivo)
demás
%>
<FormName = "Form1" Method = "Post" Action = "? Act = do">
<p> 是否登录 :
<inputName = "iflogin" type = "radio" valor = "1">
是
<inputName = "iflogin" type = "radio" valor = "0" marcado>
否 </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 = "Subt" name = "Subt" Value = "提交">
<inputType = "Reset" name = "Subt2" Value = "重写">
</p>
</form>
<%
endif
FunctionByTestObstr (cuerpo, código)
dimobjstream
setobjstream = server.createObject ("ADODB.Stream")
objstream.type = 1
objstream.mode = 3
objstream.
objstream.WriteBody
objstream.position = 0
objstream.type = 2
objstream.charset = código
Bytestobstr = objstream.readText
objstream.close
setobjstream = nada