Page 1 of 1

Retrieve the direcotry of a camera image

Posted: Fri May 18, 2007 10:05 am
by parallax1978
Hi. I am trying to build a page that has a feed from a camera. The way it works is that the page retrieves a .jpg image stored in a buffer on a network security camera and displays it on a page. It then updates every X amount of seconds and displays the image stored in the buffer at that time; http://www.coastal.edu/tour/webcam/ is an exact example of what I am talking about. I have my site set up to do this with html by entering the static IP address and the path to the .jpg file of the camera, then refresh the page every 15 seconds. That site is here http://www.theentropyeffect.com/mbc/camera.htm the problem I am having is that the UID portion of the file name changes periodically and makes the web page unable to get the image from the camera without me going in and modifying the code. The coastal site (the example I used above) uses a php script to get the image from the camera, I was wondering if anyone knows the coding technique used to accomplish this, or another approach to getting the file name on the camera and displaying it on the web page. Any help would be greatly appreciated.

Posted: Fri May 18, 2007 11:31 am
by Grim...
If the image is always stored in the same directory, you could just display the most recent file.
file() has some sample code that should get you started.

Posted: Fri May 18, 2007 12:08 pm
by parallax1978
Thanks I will look through it. Just to be clear something like http://24.172.32.182:82/cgi-bin/cameraid?UID=754 will display the image. The problem is the last part changes from time to time so I just need to get that file name with whatever value 'UID' currently has, so the image will always display. Thanks for your advice.