I don't believe it is possible to hide the physical link but it is plausibly
easy enough to write a script that randomly changes the file name and
location. Here's some psuedo code to get you started:

//Step 1: Locate the file
$query = "select * from file_locations where file_name='secure.zip'";
$result = mysql_query($query);

//Step 2: Move the file
This code is up to you, I'd be curious to think what routine you think up if
any.  My suggestions include using a routine to not only change the file
name but copy it to a different directory, which also has a non specific

//Step 3: Update Location (don't want to lose the location)
$query = "update file_locations set location=$newlocation where

Best of Luck to you,
Nathan Taylor


----- Original Message -----
From: "Fargo Lee" <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...

> Hi, my customers go through a password authentication to access a link on
> site to download a file. I want to prevent the distribution of the
> of this file on my server by making it hidden. Is there any php
> that could assist in doing this?
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
> If anyone has any ideas, examples or a way to improve on what I came up
> please respond. Thanks!
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to