I am trying to create a php script that will capture an image from my Axis 205 network camera every minute or so.
Sounds simple enough. I've done it before with other network cams but this one is a different.
The direct path to the camera's live image snapshot is http://www.exampleserver.com/jpg/image.jpg
(My camera is currently not online)
To view some live axis 205 cams here is a google search. Here is a sample snapshot
I have tried fopen($img_url), imagecreatefromjpeg ($img_url), and I also tried curl and Wget. Each php script I create using any of the above will hang and hang when trying to grab the image snapshot from the camera.
Here is a very simple example which works with any other jpg image but for some reason it just hangs with the netcam image snapshot:
Code: Select all
$img_url = "http://webcam1.webcows.se/jpg/image.jpg";
//create image
$im = ImageCreateFromJpeg($img_url);
//output the image to the browser
header('Content-type: image/jpeg');
imagejpeg($im);