Reply to Re: starting a download within php

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация