Adventure Game Studio

Community => General Discussion => Topic started by: Alynn on Sat 13/03/2004 01:42:50

Title: PHP help??
Post by: Alynn on Sat 13/03/2004 01:42:50
Ok... everything for my download counter works, but I want to seperate the Header lines....

//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
Title: Re:PHP help??
Post by: Pumaman on Sat 13/03/2004 12:41:17
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.