PHP help??

Started by Alynn, Sat 13/03/2004 01:42:50

Previous topic - Next topic

Alynn

Ok... everything for my download counter works, but I want to seperate the Header lines....

Code: ags
//Start the download
Header("Location: http://linuxbocks.com/astroedit/download/ae.zip");
//Then refresh the download page to reflect the new download number
Header("Location: http://linuxbocks.com/astroedit/download.php");


I tried putting a sleep inbetween, but if the download doesn't start before the sleep finishes, it just refreshes before the download starts, I looked into headers_sent(), but it willl start the download, but not refresh the page....

Can someone point me to some function that I could use, or a snippet of code to start with, or even a link?

Thanks

Pumaman

You can't send two "Location" headers, it's not supported by HTTP.

The best way is probably to create a special "downloadAndDisplay.php" which displays the dowonload page, but with an HTTP-EQUIV meta Refresh tag to start the download shortly afterwards.

SMF spam blocked by CleanTalk