
I've got a machine running apache2/php5/mysql and motion at pi.fairfield.org.nz (ipv6 only outside our lan) In theory it should work, but it seems motion is ipv6 only. is there some way eg php script that I can have apache connect to localhost:8081 and just forward the raw data through to the browser? I set up two scripts webcam.php and webcam2.php that are supposed to do this, but neither seem to work (as far as I can test them; I won't have ipv6 at home until tomorrow). webcam.php is this; <?php $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, '127.0.0.1', 8081); $reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != ""); echo($reply); ?> webcam2.php is this; <?php system(nc 127.0.0.1 8081); ?>