iPhone Safari Error: Cannot play movie.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jlising
Forum Commoner
Posts: 33
Joined: Mon Mar 19, 2007 1:48 am
Location: Pampanga, Philippines
Contact:

iPhone Safari Error: Cannot play movie.

Post 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.
User avatar
jlising
Forum Commoner
Posts: 33
Joined: Mon Mar 19, 2007 1:48 am
Location: Pampanga, Philippines
Contact:

Re: iPhone Safari Error: Cannot play movie.

Post by jlising »

Hello Guys,

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

Thanks!
Post Reply