Jump to content

streaming video MPEG4 header


shocker-z

Recommended Posts

Is there a special header for streaming a file?

 

<?php
include('connect.php');
$pathroot = "/home/liam/dsr-video/image/HOME/Cars/";
$ID=mysql_real_escape_string($_GET['ID']);
$getpath=mysql_query("SELECT file,folder FROM videos WHERE ID = '".$ID."'");
$path=mysql_fetch_array($getpath);
$fullfilepath=$pathroot.$path['folder'].'/'.$path['file'];
//$len=filesize($fullfilepath);
header('Content-type: video/x-msvideo');
//header('Content-Length: '.$len.'');
header('Content-Disposition: attachment; filename="'.$path['file'].'"');
readfile($fullfilepath);
?>

 

 

I'm calling this page from an embedded WMP.

 

Regards

Liam

Link to comment
https://forums.phpfreaks.com/topic/77153-streaming-video-mpeg4-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.