iPhone Safari Error: Cannot play movie.
Posted: Sun Dec 12, 2010 11:57 pm
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.
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.