well,

I've got one little problem.
I've got a download script which acts great with IE and Netscape, but when it comes to Opera, it starts messing up.

ini_set('default_mimetype',''); // PHP sends a default mimetype in my case
header("Cache-Control: public"); // needed because of sessions
header("Content-Type: application/octet-stream");
// didn't work without that properly
if(strstr($_SERVER["HTTP_USER_AGENT"], "MSIE"))
  header("Content-Disposition: filename=$filename"."%20"); 
else
  header("Content-Disposition: attachment; filename=$filename");
header("Content-Transfer-Encoding: binary"); 
header("Content-Length: ".filesize($realfile));
$fp = fopen($realfile,"r");
fpassthru($fp);
fclose($fp);

Any ideas ?

    well, I haven't still found the solution so all comments are appreciated

      Write a Reply...