<٪
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")
filename = mid (fileurl ، instrev (fileurl ، "/")+1)
ExtPos = Instrrev (اسم الملف ، "؟")
إذا (extpos> 0) ثم
اسم الملف = اليسار (اسم الملف ، extpos-1)
Endif
إذا (iflogin = 1) ثم
callposthttppage (loginacturl ، logindata)
Endif
CallDownloadFile (Fileurl ، اسم الملف)
آخر
٪>
<formName = "form1" method = "post" Action = "؟ ACT = do">
<p> : :
<pectedName = "iflogin" type = "Radio" value = "1">
是
<pectedName = "iflogin" type = "Radio" value = "0" checked>
否 </p>
<p> : :
<pectedName = "loginActurl" type = "text" size = "50">
</p>
<p>
: : <inputName = "logindata" type = "text" size = "50">
</p>
<p>
要保存的远程文件 URL :
<pectedName = "fileurl" type = "text" size = "50">
</p>
<p>
<pecttype = "إرسال" name = "إرسال" value = "提交">
<pecttype = "reset" name = "submit2" value = "重写">
</p>
</form>
<٪
Endif
FunctionByTestobstr (الجسم ، رمز)
Dimobjstream
setObjStream = server.createBject ("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 = لا شيء