Re: Downloading a file.

From: Date: Thu, 12 Jun 2003 09:00:18 +0000
Subject: Re: Downloading a file.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-151212@lists.php.net to get a copy of this message
"Jeff Harris" <jharris@rallycentral.us> wrote in message news:Pine.LNX.4.44.0306112135470.11660-100000@www.rallycentral.us... > On Jun 11, 2003, "Alex Earl" claimed that: > > |> Does anyone know what to do to make it saved as: mysoft-1.0-truc.zip > |> > |> And I would like to display a page telling "Thanks for download" or > |> something...but if I had to the end: > |> header("Location: > http://www.mywebsite.com/thanks.html") ; > |> I does not work :( > > header("Location:..."); must not be sent after any html, so you won't be > able to redirect that way. > > Perhaps if you know approximately how much time it takes to download the > file, you can use a <meta http-equiv="refresh"...> to redirect to a > "thanks for downloading" page, with a link back to the download. Better yet, can you not spawn the download off in another window, which will be closed automatically when it's discovered to be a file download instead, and then do what ever you want in the main browser window? Dustin Pate

« previous php.general (#151212) next »