

ASP : Dosyayı Farklı İsimle İndirme. ( Dosya Yolu Gizleme )
-
Başlığı abarttun, arayanlar bulabilsin.
ASP ile indirmek istediğiniz dosyanın ismi sunucudakinden farklı olsun istiyorsanız, yani sunucudaki dosyanın adresi bilinmesin istiyorsanız bu yöntemi kullanabilirsiniz.
Kod :
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", _
"http://www.4guysfromrolla.com/webtech/code/mitchell-pres.zip", _
False
xml.Send
Response.AddHeader "Content-Disposition", _
"attachment;filename=nehaber.zip"
‘ Binarywrite the bytes to the browser
Response.BinaryWrite xml.responseBody
Set xml = Nothing
%>
Bu kod ile birlikte "http://www.4guysfromrolla.com/webtech/code/mitchell-pres.zip" adresindeki mitchell-pres.zip dosyasını nehaber.zip şeklinde indirir, dosyanın adresi ziyaretçi tarafından görünmez.
http://www.4guysfromrolla.com/webtech/code/nehaber.zip olarak erişmeye çalıştığında dosyayı bulamayacaktır.
-
konuyu gorunce hosuma gitti. Hala zaman zaman eski (clasic) asp kullaniyorum ve kendilerini cok severim (Malum ilk goz arimiz)
-
Güzel bir konu.
Klasik asp hâla favorim.