Posted by Adnan on 11/04/08 11:18
Hi td,
try something like this.
<?
/*
* Change 'CONTENT=6' to however many seconds
* you want the user to wait to be linked to
* the file
*
* Put this line in between the <head> tags
*/
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"6;
URL=http://link/to/remote_file.zip\">";
/*
* put this in the main body after you registered
* the download in the db
*/
echo "Please wait while download starts...";
?>
hope this helps,
adnan
toedipper wrote:
> Hello,
>
> I want users to be able to download files on my website. The files will
> not be located on my site but on some other domain.
>
> I also want to be able to register the download first and then start it
> to the user.
>
> I imagine I would have a hyperlink on a page saying 'download here' This
> in turn would pass an id number to a page called download.php so the
> hyperlink would be "blah blah blah download.php?id=1234" etc.
>
> The download.php would also insert the date and time of the download
> into a my sql db.
>
> I can get this far myself but I am stuck now as how to actually then
> start the download once I've logged it.
>
> Any ideas?
>
> Thanks,
>
> td.
[Back to original message]
|