Page 1 of 1

iPhone Safari Error: Cannot play movie.

Posted: Sun Dec 12, 2010 11:57 pm
by jlising
Hello Guys,

I am developing a download script for mobile. Unfortunately, I am having problem in iPhone (safari). The error is "Cannot play movie. The server is not correctly configured."

my script:
if(file_exists(MEDIA_PATH.$filename)){
$filename = mb_convert_encoding($filename,"ISO-8859-1", "UTF-8");
header("Content-type: $mime");
header("Content-Transfer-Encoding: Binary");
header("Content-Disposition: attachment; filename=\"".basename($filename)."\"");
header("Content-Description: ".basename($filename));
header("Content-Length: ".filesize(MEDIA_PATH.$filename));
header("Connection: close");
readfile(MEDIA_PATH.$filename);
}else{
header("HTTP/1.0 404 Not Found");
echo "File not found.";
}

Please help.

Thanks in advance.

Re: iPhone Safari Error: Cannot play movie.

Posted: Mon Dec 13, 2010 12:14 am
by jlising
Hello Guys,

In addition to my message, I can play the movie if accessing it directly using header("location:")

Thanks!