Re: [PHP] It opens the file instead downloading

2004-05-05 Thread FanneHH Adevarap
I have *.mid files. I need a script that works in almost all browsers. - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "Phpu" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, May 05, 2004 10:51 PM Subject: Re: [PHP]

Re: [PHP] It opens the file instead downloading

2004-05-05 Thread John W. Holmes
From: "Phpu" <[EMAIL PROTECTED]> > header( "Content-type: application/force-download" ); > if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "win" { > header( "Content-Disposition: filename=".$filename); > } else { > header( "Content-Disposition: attachment

[PHP] It opens the file instead downloading

2004-05-05 Thread Phpu
Hi, I have this script taken form php.net $filename=plenar.mid; $file_to_download=files/plenar123.mid; $user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]); header( "Content-type: application/force-download" ); if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpo

[PHP] It opens the file instead downloading

2004-05-05 Thread Phpu
Hi, I have this script: $filename=plenar.mid; $file_to_download=files/plenar123.mid; $user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]); header( "Content-type: application/force-download" ); if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "w