Forum de discussion
Forum « Programmation ASP » (archives)
Streaming avec asp
Envoyé: 8 mars 2006, 14h15 par nacermtl
<?
/*
Medianova PHP server script1 to handle client streamer module
Cache control code
*/
//Clearing Cache
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// Always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
//End of Clearing Cache
// Set content type in the header.
header("Content-Type: video/x-flv");
$file="/medianovatech/FFaradj/medianovatech.com/web/novastream/";
$seekat = $_GET["position"];
$file1 = $_GET["file"];
$file .= $file1
header("Content-Type: video/x-flv");
if($seekat != 0) {
print("FLV");
print(pack('C', 1 ));
print(pack('C', 1 ));
print(pack('N', 9 ));
print(pack('N', 9 ));
}
$fh = fopen($file, "rb");
fseek($fh, $seekat);
while (!feof($fh)) {
print (fread($fh, 6384));
// print (fread($fh, filesize($file)));
}
fclose($fh);
?>
Réponses
|