On Wed, 2011-06-01 at 00:08 +0430, Ali Asghar Toraby Parizy wrote: > Hi > thanks for your help jean > I've used this code before. But I want a little different thing. > I need to tell something to the user before starting download. > something like "Your download will begin in a moment..." . So header > couldn't help me. If I try to echo anything header doesn't work! > > On Tue, May 31, 2011 at 10:01 PM, jean-baptiste verrey > <jeanbaptiste.verrey@xxxxxxxxx> wrote: > > it's made in JavaScript, by creating an iframe loading the file, but their > > downloader might use something like a php file to force download such as > > <?php > > $filePath='/var/wwwblablah.zip'; > > header('Content-type: application/octet-stream'); > > header('Content-Disposition: attachment; filename="azipfile.zip"'); > > readfile($filePath); > > ?> > > > > On 31 May 2011 18:02, Ali Asghar Toraby Parizy <aliasghar.toraby@xxxxxxxxx> > > wrote: > >> > >> I want to build a web page for file auto download like cnet.download. > >> A page that tells user "Your download will begin in a moment..." and > >> after a few seconds download starts. > >> How can I do that by php > >> thanks for any help. > >> > >> -- > >> Ali Asghar Torabi > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > > > > > > -- > Ali Asghar Torabi > That's why Jean mentioned the use of Javascript and an Iframe. You have the iframe point to your PHP script, and the rest of the page is what you use for your message, etc. The Iframe can be hidden with CSS, and it will still issue the call to download the file. -- Thanks, Ash http://www.ashleysheridan.co.uk