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.
iPhone Safari Error: Cannot play movie.
Moderator: General Moderators
- jlising
- Forum Commoner
- Posts: 33
- Joined: Mon Mar 19, 2007 1:48 am
- Location: Pampanga, Philippines
- Contact:
Re: iPhone Safari Error: Cannot play movie.
Hello Guys,
In addition to my message, I can play the movie if accessing it directly using header("location:")
Thanks!
In addition to my message, I can play the movie if accessing it directly using header("location:")
Thanks!