Ever want to use your Amcrest IP Camera as a webcam to show a regularly updated image on a webpage? Now you can with some simple software and a web server. This page documents ongoing development of the project and provides a handy reference for those who want to accomplish the same thing with their Amcrest IP cameras.
Software Download
The software is available on a GitHub repository here.
System Requirements
You will need the following in order to successfully make your Amcrest IP camera automatically upload images for display on your website:
- Amcrest IP camera
- Internet connection
- Webserver with FTP connection
- Basic understanding of your webserver’s configuration
How to Setup
Step 1: Configure the server
While you can run this software in many different ways, I suggest that you setup a unique FTP account for your Amcrest IP camera to connect to. This FTP account should only be used for the camera. I personally setup a subdomain to isolate the camera.
Step 2: Configure the Amcrest IP Camera
Still to come…
Step 3: Upload the PHP to the server
Upload the PHP code that you retrieved from GitHub. You need to pick which method of deployment that you want to use.
Method 1: Copy the most recent photo to a static location.
The advantage of this approach is you don’t expose the directory structure of your camera uploads to the user. However, I have found that occasionally the copy process fails to copy the entire image. I think that this as a result of my under-powered webserver. You may have better luck than me.
If you want to go with this option, use copy.php.
Method 2: Point to the most recent photo.
The advantage of this approach is that you don’t need to make your server copy the most recent file. The disadvantage is that you end up revealing your camera’s directory structure which you might not want. However, the image is always served without issue.
If you want this option, use find.php
Step 4: Modify the Configuration File
Now you need to modify the amcrest_config.php file with the values that you want for each of the configurations.
Step 5: WordPress Integration
I personally am using this with WordPress. However, you can also use either of the methods as stand-alone files.
To integrate with WordPress, look at the HTML_for_Word_Press.txt file. The top portion of the HTML is meant to be used with copy.php while the bottom portion is for find.php. Use the “custom HTML” block in editor to add your HTML code.
Unless you want everyone to see your camera images all the time, I suggest you use WordPress’s ability to password-protect the post or page that you add the HTML code to.
Conclusion
That’s all you need to do to get your Amcrest IP camera serving the latest image to your website. If you run into problems, please drop me a line at douglas.vanbossuyt@gmail.com and I’ll see if I can help.
Thanks and Acknowledgements
I wouldn’t have embarked on writing this little simple PHP script were it not for my friend Ray Anderson who gave me the code he wrote for his Amcrest cameras. I took what he was doing and did a bunch of stuff to modify it for my purposes. Thanks again, Ray!