<%
Dimact,Iflogin,Loginurl,LoginActurl,LogIndata,fileurl,fileName
ACT = request.querystring(“ ACT”)
如果(act =“ do”),則
iflogin = cint(request.querystring(“ iflogin”))
loginacturl = request.form(“ loginacturl”)
logindata = request.form(“ logindata”)
fileurl = request.form(“ fileurl”)
文件名= mid(fileurl,instrev(fileurl,“/”)+1)
extpos = instrrev(文件名,“?”)
如果(Extpos> 0),則
filename = left(文件名,extpos-1)
Endif
如果(iflogin = 1),則
callposthtpppage(loginacturl,logindata)
Endif
Callownowloadfile(Fileurl,文件名)
別的
%>
<formName =“ form1” method =“ post” action =“?act = do”>
<p>是否登錄:
<inputName =“ iflogin” type =“無線電”值=“ 1”>
是
<inputName =“ iflogin” type =“無線電”值=“ 0”檢查>
否</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 =“ submit” name =“ submit” value =“提交”>
<inputType =“ reset” name =“ crist2” value =“重寫”>
</p>
</form>
<%
Endif
功能bytestobstr(車身,代碼)
dimobjstream
setObjstream = server.createobject(“ adodb.stream”)
objstream.type = 1
objstream.mode = 3
Objstream.open
objstream.writebody
objstream.position = 0
objstream.type = 2
objstream.charset =代碼
bytestobstr = objstream.readtext
objstream.close
setObjstream =沒有