Download

I would like to create a link to download a file which is unique, so the download cannot be resummed. The only way to download it would be to go threw that link. I would like somthing like rapid share where you cannot download it again. Please help thanks

here is an idea you could use php function “rename” to rename the file after it has been downloaded then update the database with the new name of the file.
do some thing like:
[php]
$rand=rand(1,999999999);

$a=mysql_query(“SELECT filename FROM files WHERE id=$fileid”);
$b=mysql_fetch_assoc($a);
$originalfilename="{$b[‘filename’]}";
$newfilename=$rand.$originalfilename;
rename($originalfilename, $newfilename);
mysql_query(“UPDATE files SET filename=$newfilename WHERE id=$fileid”);
[/php]

I have no idea how you are storing your filenames(locations) so that is the best I could come with on the fly

oh and [php]mysql_query(“UPDATE files SET filename=$newfilename WHERE id=$fileid”); [/php]

should be:

[php]mysql_query(“UPDATE files SET filename=’$newfilename’ WHERE id=$fileid”);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service