Need a Download Script.

Hello Sir,

I need a Download Script that Hide the original URL of File, and also can download files from other server

I.E –

There is a file on my friends site http://www.myfrndsite.com/download/folder/file.mp3 … But i need to take this file thru a PHP script like this url … http://www.mysite.com/dl.php?FileName=file.mp3 or dl.php?id=001 … (2nd syntax would bemost preferred…)

Thanks in Advance. i think u can understand what am i saying. Bcoz i m poor in ENGLISH ;D

If file is hosted on remote server, your script will need to download it first and save on local server (in directory that is not accessible from web). Then, the code for your dl.php will be like this:
[php]<?php

$fn=$_REQUEST["FileName"];

header("Content-type: audio/mpeg");
header("Content-Disposition: attachment; filename=\"".$fn."\"");
header("Content-Length: ".filesize('files/'.$fn));
readfile("files/".$fn);

?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service