Got an IP webcam but need to show it on your website? Cheap cameras frequently have crappy interfaces or login requirements. Using CURL and PHP, you can work around a number of issues while also hiding the username/password/port your webcam is actually on.
With a bit more work, you could even cache responses to provide better performance. This is next on my todo list, but contributions are welcome. Check out the Github repository for downloads and additional files!
Also see my img2mpg code and quick n dirty signage for other related scripts.
3 thoughts on “IP Camera Proxy in PHP and HTML”
Please see this as well: http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html
I have a cheap Chinese camera that does not allow anonymous logins and have tried your script but it does not work. When i go to the url …/snapshot.php?camera=1 it just sits waiting for a few minutes then returns a blank page. Can anyone help?
Did you enable all errors/notices/warnings?
If not, add this line to the top of the script: