w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Apache embedded Mjpg stream issue

I ended up solving this issue through the use of a php proxy. I came across a great example on another site that I will post below along with a link to the forum.

<?

/*
usage on webpage:
<img src="stream.php">
*/ 
$server = "localhost"; // camera server address
$port = 8443; // camera server port
$url = "/?action=stream"; // image url on server
set_time_limit(0);  
$fp = fsockopen($server, $port, $errno, $errstr, 30); 
if (!$fp) { 
    echo "$errstr ($errno)<br>
";   // error handling
} else { 
    $urlstring = "GET ".$url." HTTP/1.0

"; 
    fputs ($fp, $urlstring); 
    while ($str = trim(fgets($fp, 4096))) 
    header($str); 
    fpassthru($fp); 
    fclose($fp); 
} 
?>

http://www.plugcomputer.org/plugforum/index.php?topic=6231.0





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.