Try this : How to let a user download a picture by clicking on it instead of needing to right click and Save-As. http://www.weberdev.com/get_example.php3?count=1562
How to force the user to download a file instead of opening it up in an controlled environment within the browser (i.e. MS Word/Adobe Acrobat) http://www.weberdev.com/get_example.php3?count=1627 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. Share your code : http://addexample.weberdev.com Search for PHP Code from your browser http://toolbar.weberdev.com -----Original Message----- From: Ms Carlsson [mailto:[EMAIL PROTECTED] Sent: Sunday, September 28, 2003 1:13 PM To: [EMAIL PROTECTED] Subject: [PHP] Dwonload with PHP do not work.. $file = "/home/xxxx/openssh-3.6.1p1.tar.gz"; $mb = filesize($file); $download = "openssh-3.6.1p1.tar.gz"; $fp = fopen($file, "r"); Header ( "HTTP/1.1 206 One resume, coming up!" ); Header ( "Pragma: no-cache" ); Header ( "Content-Type: application/octet-stream" ); Header ( "Content-Length: ".filesize("$file") ); Header ( "Content-Disposition: attachment; filename=$download" )$ readfile("/home/xxxx/openssh-3.6.1p1.tar.gz"); exit; THis start a download but give me a corrupted downloaded file... Any help out here...... _________________________________________________________________ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php