Stream m4v to iPhone using PHP
$iFile = "/full/path/to/file.m4v;
header('Content-Type: video/x-m4v');
header('Content-Disposition: inline; filename="'.basename($iFile).'"');
header('Content-Length: '.filesize($iFile));
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
readfile($iFile);
exit;
This works fine in any standard browser, however, on the iPhone, I get a message saying:
"This movie format s not supported."
Anyone have any ideas about streaming from PHP to an iPhone?
I'm using PHP 5 and Apache for the webserver.