<% if not fromThisDomain("attachment.asp?m=") then response.redirect (forumdir&"first.asp?error=referer") response.end end if Dim strFilePath strFilePath = server.mappath(RC4(HexToString(Request.QueryString("File")),strRC4Password)) Response.Clear Dim objDownload Set objDownload = new PGDDownload objDownload.ReadFrom(strFilePath) Response.AddHeader "Content-Disposition", "attachment; filename=" & ScrambleFileName(objDownload.FileName) Response.AddHeader "Content-Length", objDownload.FileSize Response.Charset = "UTF-8" Response.ContentType = objDownload.ContentType Response.BinaryWrite objDownload.ByteArray Set objDownload = nothing Response.Flush %>