IP Camera Proxy in PHP and HTML

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.

Advertisements

3 thoughts on “IP Camera Proxy in PHP and HTML

  1. John says:

    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?

  2. E71 says:

    Did you enable all errors/notices/warnings?

    If not, add this line to the top of the script:
    error_reporting(E_ALL);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s