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
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.