header("Content-type: application/x-octet-stream");
You'll also need differing Content-disposition: headers for IE and Netscape.
And, just for fun, you need Content-length: if you expect the pretty
progress meter to work.
For total fun, there's also a minor version of some browser where you need
to incorporate the filename into the URL:

yourserver.com/whatever.php/filename.tar.gz?filename=filename.tar.gz

The broken browser stupidly ignores your headers and uses the URL to decide
what to do...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Smileyq <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 11, 2001 1:15 AM
Subject: Getting a script to download files from an ftp server?


> I'm attempting to write a script to download files from a ftp server.
> Basically what will need to be done is this. The website will have a
> searchable database and once the selected items are found will have a
> download link. From this I would like to click on the download link and
> sent that to the php script to download the file.
> I've been messing around with it but can't seem to get it to work. As an
>   example I've sending the request from the previos page like this.
> page.php?dir=blabla&file=downloadme.tar.gz  . This is then sent to the
> php script and I cant' get it to download correctly. I'm looking for it
> to pop up the download manager and download it that way instead of
> opening it up in the browser. I'm at a loss here. Thanks..
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to