Important Message from Foscam Digital Technologies Regarding US Sales & Service



We, Foscam.US (aka Foscam Digital Technologies and now Amcrest Technologies), are an independent United States based distributor of "Foscam" branded products. We have been offering telephone support, US local warranty and building the Foscam brand in the US for the past 7 years. However, we are deeply saddened to report that, even after all of this, our overseas suppliers have decided to undercut us and supply to our major customers directly. For this reason, we have no choice but to suspend telephone support for all Foscam branded products. If you have purchased a Foscam camera directly from us or from one of our authorized retailers, technical support is still available via email at support@foscam.us.


For customers who have not purchased from us directly, we advise you to please contact Foscam Shenzhen or the distributor which you have purchased from. In the meantime, we have launched our own new brand of IP cameras called Amcrest, which has superior quality products and full telephone technical support 7 days per week. We hope you can support us in our new venture. For more information, please visit www.Amcrest.com.



Showing Secure Methods Using PHP To Display Your IP Cameras

General discussion regarding Foscam IP Cameras

Showing Secure Methods Using PHP To Display Your IP Cameras

Postby TheUberOverLord » Mon Feb 17, 2014 10:08 am

Any IP Camera owner can optionally easily get and use All my many different IP Camera examples bundled together with one hour of one-on-one support to implement them. Save Time and Money Click Here!

For the full list of live demo IP Cameras. Please click the link below:

http://107.170.59.150

Image

Free SecureImageDisplay Version 5.0 - (Display Only). Display with Camera Controls is included with bundle above

*** Now Optionally Supports Adding Custom Logos and Images ***

This Interface supports both accessing your IP Cameras totally securely for private personal use or for public Internet use by others. Using single real-time static images or automatic refreshed images or both, from your IP Cameras. With or without PTZ ("Pan/Tilt/Zoom") IP Camera controls. With or without requiring a logon. Required logins can be the User Id and password of your choice and have nothing to do with any User Id or password in the IP Camera itself.

This Interface can be used from any Internet browser capable devices. From Computers to Tablets to Phones and TV's. Allowing you to use it from all your devices or by any device visitors use to view your website. Without ever needing to download or install. Anything.

Note: Many of the Foscam demo IP Camera models are being moved. New links to their locations will be used after these moves. Some demo IP Cameras can be down at times. Which I have no control over. If you see nothing using a link for an example here. Please try another IP Camera example link here. There are many different demo IP Cameras and examples here.

Four Live Examples Below

With Logos/Images and Custom Text and Without Camera Controls. Using Default Camera Image Size:

http://107.170.59.150/Axis/SecureImageDisplay1.htm

With Logos/Images and Custom Text and Without Camera Controls. But With Digital Zoom:

http://107.170.59.150/Axis/SecureImageDisplayZoom1.htm

With Logos/Images and Custom Text and With Camera Controls Including Both Camera Zoom Lens Control and Digital Zoom Control:

http://107.170.59.150/Axis/SecureImageD ... ontrol.htm

Same As Above. But Requiring A Logon. User:admin Password:admin You Can Use Any User Id and Password Of Your Choice:

http://107.170.59.150/Axis/SecureImageD ... lLogin.php

Live demo IP Cameras are used to demonstrate all these different types of usages below. Which are many! That this Interface can be used for.

Totally Secure. Optionally add Logos/Images of any sizes, shapes, locations and clickable or not clickable. Embedded in your cameras images as they display. Use as a marketing tool or watermark for your cameras. Viewable by any Internet browser capable devices from Computers to Tablets to Phones and TVs.

This may seem trivial at first. But imagine being able to have your Logo or images ("Actually embedded in your cameras live images being displayed") and that when specific Logos/Images are clicked on. They take you to specific places based on what Logo/Image was clicked on. Social media sites, other web pages. Your choices are endless.

Many different types of Logos/Images are used in the live IP Camera examples below. To help demonstrate the diversity and the complexity of the images you can and could merge with your IP Cameras images.

You could even embed Preset image buttons in the IP Cameras images or buttons that take you to other IP Cameras, that when clicked on, move the cameras view to specific camera views or jump instantly to other IP Cameras.

Live IP Camera examples, without IP Camera PTZ controls and where when the "Request More Info" Logo/Image button" is clicked on, it takes you one place and any other Logos/Images and areas of the live cameras views, when clicked on, can take you to another place.

Showing that even fixed view IP Cameras without PTZ IP Camera controls, can also benefit from this Interfaces features.

* U.S. China time difference allows seeing IP Cameras in daylight and at night at the same time.

Live H.264 IP Camera Examples Without Camera Controls:

U.S. http://107.170.59.150/FI9805WLogo.htm

China http://107.170.59.150/FI9828WCLogo.htm

All the secure examples above and below, also support HTTPS secure access methods even with IP Cameras which don't natively support HTTPS access methods.

Image sizes for the examples shown below are small for demonstration purposes. You can use any sizes.

Works with ANY IP Camera
Image
Accessible From ANY Computer, Laptop, Tablet, Phone and TV

This FREE Interface works with ALL Foscam IP Camera models and virtually all other IP Cameras as well as any imaging devices that can supply Snapshots via HTTP and/or HTTPS.

This Interface is compatible with any and all Internet browser capable devices running on any Operating System and using any browser. From Computers to Tablets to Phones and TVs. Without the need to download/install any additional software and works instantaneously when accessed from any Internet browser capable device.

This Interfaces Global Zoom Ability Even With IP Cameras That Have No Zoom Lens!

Note: The Zoom per click is a configurable option. For this example, it's set to zoom 50 percent, per click.

http://107.170.59.150/foscam/GlobalZoomExample.htm

This interface also will work with workplace, Wireless Hotspots and other Proxies, that normally block access to your IP Cameras or that may not be totally secure.

Here are the current features and options this Interface supports:

Display Custom Logos and images in your IP Cameras Images
Instantly Works With Any/All Internet Browser Capable Devices
Totally Secure With or Without Controls and With or Without HTTPS
Always Totally Secure Using Any Internet Connection
Securely Post Real-Time Camera Images Anywhere Even Emails
Securely Display As Many Cameras As Needed At Same Time
For Emergency Use When Stuck Using Other Devices
Works Behind Corporate And Other Proxies
Require Unique User and Password to Access
Allows HTTPS Access Even For MJPEG Based IP Cameras
Set Time Limit for Viewing
Use Any Size Automatically Refreshed Images Clickable or Not
Use Automatically Refreshed Thumbnails Clickable or Not
Use Any Size Static But Real-Time Images Clickable or Not
Use Real-Time Images in Social Media Websites, Forums and Blogs
Extended Access Restrictions for ALL Foscam IP Camera Models
Save Last Real-Time Image From Foscam IP Camera To Disk
Real-Time Image Request Throttling
Auto-Recovery Display Last Image Saved When Camera Is Offline
Automatic Image Percentage Resize
Automatic Image Fixed Size Resize
Insert Date Time and Custom Text Into Images
Time Zone Offset When Web Server Is In Another Time Zone
Controlled Privacy Display Last Image Saved During Private Times
Automatic Image Refreshing Using HTML Front-End ("Example Included")

If you don't already have a website or a web server to host things like this or to store your IP Cameras Snapshot images and/or videos via FTP. All the examples here are hosted by DigitalOcean which I have found to have great prices and support. No domain name is required and you get your own unique IP Address and it's your Web Server, NOT shared!
Click for more details

Accessing your IP Cameras over an unsecure Internet connection or displaying your IP Cameras in webpages on websites can be a very risky proposition. "What you can't see CAN hurt you". When you communicate remotely or someone else communicates remotely with your IP Camera.

In many cases when using HTTP as the access method to access your IP Cameras remotely. The IP Cameras DDNS, IP Address, Port, User Ids and Passwords are exposed in the clear. As you can see below which captured IP Camera communications using a free tool. That anyone can download:

MJPEG Based IP Camera
Image

H.264 Based IP Camera
Image

As you can see in the above images. This information was exposed during ("normal") HTTP IP Camera remote access. Even when using the standard IP Camera interface that comes with the IP Cameras using HTTP access. Even when using many if not most 3rd party applications for your IP Cameras when using HTTP access. The same exposure can take place when others are accessing your IP Cameras from a webpage located on a website which you allow.

This opens up the potential for others who gain access to this information, to abuse and exploit your IP Cameras by being able to view your IP Cameras Snapshots, video and listen to audio, from your IP Cameras 24/7/365 at anytime.

Do you the IP Camera owner really want anyone to be able to be able to view your IP cameras video and listen to your IP Cameras audio, whenever they wish?

Worse. If someone manages to captured your IP Cameras DDNS, IP Address, Port, User Id and Password and that IP Cameras User Id was at least an Operator Level User Id for your cameras. Anyone can be constantly changing the position of your IP Cameras. Again 24/7/365 if those IP cameras have PTZ ("Pan/Tilt/Zoom") controls while also being able to view and listen to your IP Cameras 24/7/365 as well. What if they pass that information on to others? How many different individuals could be doing any of these things, at anytime?

Note: If your IP cameras are moving they won't trigger any motion detection alarm. If someone points your IP Cameras at the ceiling, odds are good that your IP Cameras won't be capturing anyone destroying or taking your property as well. So maintaining the ambiguity of any and all information about your IP Cameras location and User credentials, should be a top priority.

The very worse case scenario would be if someone were to capture the DDNS and/or IP Address and Port for your IP Cameras and any Admin Level User Id and password accessing your IP Cameras. They then would be able to do all the above, plus also dump your IP Cameras configuration information gaining access to ANY Email and/or FTP User Ids and passwords for them. Stored in your IP Cameras configuration.

Potentially allowing them to take over your Email account and/or abusing your FTP credentials to destroy files and/or any webpages they maybe able to access using that FTP access.

This interface allows you to avoid this from ever taking place even when using HTTP access or HTTPS Access from any Internet browser capable device. The latest version of this Interface also allows you to not only display your IP cameras securely but to also control them securely as well. This allows you to remotely access or others you allow from web pages on websites to remotely access your IP Cameras with complete and total ambiguity of what if any DDNS, IP Address, Port, User Id, Password is being used to access your IP Cameras using this Interface.

If you want to get a very good idea of the data which is normally exposed when communicating with your IP camera using HTTP Access. I suggest you install this free tool which will show you how often this information is normally in the clear:

http://www.telerik.com/fiddler

Most likely you will be shocked when you run it while accessing your IP Cameras using normal methods.

You then can use the same tool above. While using the Interface examples here as well. To see that this Interface is totally secure even with HTTP access and it can be used with HTTPS access even with MJPEG based IP Camera models. Which is NOT normally the case.

Note: Currently. The MJPEG based IP Cameras don't normally support HTTPS access methods. So HTTP access is your only choice. This Interface however, does support HTTPS access to MJPEG based IP Cameras.

The H.264 based IP Camera models don't natively support all browsers for all Internet browser capable devices. Which means that securely accessing the H.264 based cameras from any Internet browser capable device is normally not possible as well. When using all your possible devices as well as if you wish to allow others to access your IP Cameras from a webpage using any of their Internet browser capable devices. Without the potential need to download/install and/or purchase specific software on a device by device basis. This Interface instantly solves that.

As stated. This Interface is compatible with any Internet browser capable devices. From Computers to Tablets and Phones to TVs. Without any need to download/install any additional software for any Internet browser capable devices to use and access the Interface instantaneously. Using HTTP or HTTPS access methods for any IP Camera.

Live Examples Demonstrating Unsecure and Secure Display for your IP Cameras:

Note: Check the U.S. Based CDT Timestamp on each image below. If the Demo IP Camera is offline ("Timestamp on image is very old") you will not be able to view the camera in real-time if you click on that IP Cameras image shown below.

Click on any of the Fourteen Foscam U.S. IP Camera demo images below to view a specific IP Camera in Real-Time using unsecure methods to allow you to see if you choose what IP camera information is normally exposed using other methods and HTTP access to your IP Camera. If the IP Camera in question natively supports HTTPS then even the unsecure Interfaces can be changed to use HTTPS vs. HTTP and be used securely as well.

Last Real-Time Images Stored On Disk Displayed - CDT Time
ImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Live Demonstrations Showing ALL Fourteen Foscam U.S. Demo IP Cameras At The Same Time Using Totally Secure Methods Using Automatic Refreshed Images:

Without Login Required:

http://107.170.59.150/foscam/FoscamUS.htm

User Name and Password can be ANY combination of characters. Please note that when using HTTP the User and Password are sent in the clear in this Login example. User name is admin Password is admin

With Login Required:

http://107.170.59.150/foscam/SecureImageDisplayLoginUS.php

The same can be done using HTTPS however the example is using a self-signed certificate so you will see a warning:

Without Login Required:

https://107.170.59.150/foscam/FoscamUS.htm

With Login Required:

https://107.170.59.150/foscam/SecureImageDisplayLoginUS.php

Extended Access Restrictions for all Foscam IP Camera Models

If someone were to try to access the Interface that was not allowed to do so and they tried to grab Snapshots or Refreshed Snapshots from your Foscam IP Camera(s). There are Extended Access Restrictions you can implement and use with the Interface. To deny anyone access to the Interface directly. Even if they know the file location of the Interface on the web server.

Example ("Compare above links HTML source code to links below"):

http://107.170.59.150/foscam/FoscamUSAttempt.htm

https://107.170.59.150/foscam/FoscamUSAttempt.htm

Note: Check the Shenzhen China Based Timestamp which is 14+ hours more then U.S. CDT time on each image below. If the Demo IP Camera is offline ("Timestamp on image is very old") you will not be able to view the camera in real-time if you click on that IP Cameras image shown below.

Click on any of the Six Foscam.com IP Camera Demo images below to view a specific IP Camera in Real-Time using unsecure methods. If the IP Camera in question natively supports HTTPS then even the unsecure Interfaces can be changed to use HTTPS vs. HTTP and be secure as well.

Last Real-Time Images Stored On Disk Displayed - China Time
ImageImageImageImageImageImage

Live Demonstrations Showing ALL Foscam.com Demo IP Cameras At The Same Time Using Totally Secure Methods Using Automatic Refreshed Images:

Without Login Required:

http://107.170.59.150/foscam/FoscamChina.htm

User Name and Password can be ANY combination of characters. Please note that when using HTTP the User and Password are sent in the clear in this Login example. User name is admin Password is admin

With Login Required:

http://107.170.59.150/foscam/SecureImageDisplayLoginChina.php

The same can be done using HTTPS however the example is using a self-signed certificate so you will see a warning:

Without Login Required:

https://107.170.59.150/foscam/FoscamChina.htm

With Login Required:

https://107.170.59.150/foscam/SecureImageDisplayLoginChina.php

Extended Access Restrictions for all Foscam IP Camera Models

If someone were to try to access the Interface that was not allowed to do so and they tried to grab Snapshots or Refreshed Snapshots from your Foscam IP Camera(s). There are Extended Access Restrictions you can implement and use with the Interface. To deny anyone access to the Interface directly. Even if they know the file location of the Interface on the web server.

Example ("Compare above links HTML source code to links below"):

http://107.170.59.150/foscam/FoscamChinaAttempt.htm

https://107.170.59.150/foscam/FoscamChinaAttempt.htm

The Facts

One of the downsides of accessing your IP Cameras over insecure Internet connections or displaying "Real-Time" image(s) of your Foscam IP Cameras in Social Media sites, Blogs, Forums, Web Pages, Instant Messengers or even in Emails as an image or as links. Is that by doing so, you expose and show your Foscam IP Cameras DDNS and Port or ISP IP Address and Port and User Id and Password credentials for your Foscam IP Camera.

This Interface provides methods that resolve the above issues with future versions and functionality to come. Even while using HTTP unsecure access methods to any of your Foscam IP Cameras.

Secure Private Use

These images and their very secure methods. Contain no reference to your Foscam IP Cameras Model information, DDNS, IP Address, Port or Cameras User credentials on where the Foscam IP Camera images originated from or how they were obtained.

In fact. These methods can be used to check on your Foscam IP Cameras when you are using any Internet browser capable device that is using public or semi-private Internet access. Such as public WiFi access or even your workplace and other semi-private internet connections for your Internet connection at that time.

Where you do not trust or wish to broadcast ANY information about your Foscam IP Cameras when accessing them on any risky or potentially unsecure Internet connection.

Where by doing so. Could and can expose you to Identity Theft or other IP Camera abuses. If others could use that exposed information. To abuse your IP Cameras by changing their position and/or viewing their video streams and/or listening to their audio, at anytime and/or gain access to your IP Cameras configurations. Thereby and possibly ("Depending on the User Id Level you used to access your IP Camera when using those unsecure Internet connections") others could also learn your Email and/or FTP User Ids and Passwords for them. Why take that RISK on a unsecure internet connection when there no longer is a need to do so?

Note: Once someone learns where your IP Camera is located ("DDNS and/or ISP IP Address and Port") over an unsecure Internet connection. While also having any valid IP Camera User Id and Password information that was exposed because of using that unsecure Internet connection. They can connect to your IP Camera and based on the IP Cameras User Id level and Password that they ("Sniffed") and captured over a unsecured Internet connection. They can also determine what type of IP Camera is being used during that ("Sniffing") process.

At the very minimum, they would have unfettered 24/7/365 access to your IP Cameras video and audio streams anytime your IP Camera was online and still using that same DDNS and Port or ISP IP Address and Port and User Id and Password for that IP Camera, that they ("Sniffed") on that unsecure Internet connection. That's a "Best Case" scenario and definitely not the worse case scenario and for sure, not worth the risk.

Some corporate, workplace, Hotspots and other Internet connections or their proxies. May block and not allow access to ports other than ports 80 and 443. This gets around those blocks as well. Allowing you to always have access to your Foscam IP Cameras. From anywhere using any Internet browser capable device.

Secure Public Use

Here are methods to securely display your Foscam IP Cameras "Real-Time" in Social Media sites, Emails, Forums, Blogs, Web Pages, Instant Messengers and anyplace where you can include images or links in your post. As well as your own web pages which can now include "Real-Time" Snapshot images of your Foscam IP Cameras and/or automatically refreshing Snapshot images from your Foscam IP Cameras, at the intervals, of your choice.

Without needing to include or expose any reference to your Foscam IP Cameras DDNS, IP Address, Port or Foscam IP Cameras User credentials. With or without your own custom text and/or date and timestamp embedded in the actual image(s) displayed.

This is an excellent method for example. To display a current single image or automatically refreshed images of any Foscam IP Camera. MJPEG or H.264 based, in Real-Time, on a web page at the time a visitor visits and views that webpage. Without giving up any information about your Foscam IP Camera location or user credentials. While and when doing so.

Download

Both these examples require having access to a Web Server with PHP.

In some cases. Web Hosting services do NOT allow access to non-standard outgoing ports. Meaning a port other then port 80. If your Web Hosting service will not open a non-standard port to your current Foscam IP Cameras port. You will be forced to use port 80 for your Foscam IP Camera, to get this to work. The php script automatically checks and reports if this is the case.

Here are the 16 files required for this Interface. All in a .zip file:

http://107.170.59.150/V50/SecureImageDisplayV50.zip

These examples below are using a 160x120 and 320x180 resolutions for live demonstration purposes. But you can display any camera resolution for your Real-Time Snapshots or automatic refreshed Snapshots of your Foscam IP Camera on Social Media sites, Blogs, Forums or anywhere that allows you to add an images and/or links to your post. Including your Emails.

Examples

Both examples below are using the same Interface with different configuration options.

First Example - Simple Proxy

The first example. Simply pulls a current image from your Foscam IP Camera in "Real Time" and displays it on the web page that references it. Left is Foscam FI8918W. Right is Foscam FI9821W-V2:

Image Image

The images you see above. Are Real-Time images that were just created when you loaded and viewed this Forum post web page. Not old images from the past, when this post was created and posted here in the forum.

You can do the same on any Forum, Blog, Social Media Site, Web Pages, Instant Messengers and in Emails that allows you to include images and/or links in your posts. Including your own Web Pages.

Even if the you are not allowed to include images in your posts. You can instead include a link that when clicked on can display a Real-Time image of your Foscam IP Camera. With or without custom text included in those images. Without exposing any information about your Foscam IP Cameras DDNS, ISP IP Address, Port, User Ids or Passwords to do so. Example:

Secure Single Images Without Custom Text

Foscam MJPEG based IP Camera:

http://107.170.59.150/FoscamPullImage2.php

Foscam H.264 based IP Camera:

http://107.170.59.150/test/SecureImageDisplayH264.php

You can also use these same secure methods that do not expose any information about your Foscam IP Camera. Such as your DDNS, ISP IP Address, Port, User Ids and Passwords. To display your Foscam IP Camera using automatic Real-Time images that refresh at the rate you desire by embedding the logic in a Web Page or including a link in Social Media sites, Blogs, Forums and Web Pages, Instant Messengers and your Emails. With or without custom text. Example:

Secure Images Automatically Refreshed Without Custom Text:

http://107.170.59.150/SecureRefreshWithoutText.htm

Display Multiple Cameras With Automatic Refreshed Secure Images

Images Automatically Refreshed With Multiple Cameras At The Same Time ("Same camera being used for live demonstration purposes"):

http://107.170.59.150/TwoCameras.htm

Note: You can display as many Foscam IP Cameras, at the same time as you wish. Each configured differently or the same. Each with or without custom text and using any combination of Foscam IP Camera models with each being the same or different sizes. In any display configuration you wish. With ALL Foscam IP Cameras being displayed. Using these totally secure methods.

The Web Server is not storing any image file on disk, in the above example.

This means that if your camera was offline or not available. That no images would be shown.

This example is simply acting as a go-between for where the images will be posted and the Foscam IP Camera. So that the location and User credentials for the Foscam IP Camera remain private and hidden.

Second Example - Custom Text - Automatic Throttle & Fallback

This example actually does create a single jpg file for each Foscam IP Camera on the web server, which is reused as needed. This can also help you control web server resources when using methods like this unlike example #1, which will try and pull a image, each and every time from your Foscam IP Camera.

This second example, has many benefits over the first example, shown here.

1. It stores the last real-time image received from your Foscam IP camera on disk ("With any changes you configured") so that IF your Foscam IP Camera was offline or not available. The last image stored on disk will be used automatically for image fallback and displayed automatically. Not letting anyone know your Foscam IP Camera is offline or not available. Assuming that your image is not using a timestamp of course.

2. You can set the number of seconds since the last real-time image received from your Foscam IP camera was written to disk to get a fresh image directly from your Foscam IP Camera. So that you can better control resources when/if needed. Only getting a fresh image from your Foscam IP Camera when or if the image on disk is greater then x seconds old. Automatically throttling real-time requests to your Foscam IP Camera.

3. Allows you to insert your custom text and/or a date timestamp into the actual image and store it on disk. Technically it's also possible to add your own logo to your Foscam IP Cameras images displayed, with few changes to do so.

4. Privacy. Say you don't want real-time images of your Foscam IP Camera displaying all the time. You can simply temporarily change the Password for the User Id that the Interface is using. In the Foscam IP Cameras configuration.

This will cause the Interfaces real-time request to the Foscam IP Camera when trying to get a real-time image to fail. Because the Interface will now be using the wrong Password.

With the Disk logging configuration on in the Interface. Then the last real-time image from your Foscam IP Camera will be used as the image displayed.

You then can at anytime later. Change the Password back to what the Interface is using and real-time images from your Foscam IP Camera will then be getting real-time images from your Foscam camera. Instead of the last image on disk.

Giving you privacy when you need it. While not displaying empty images while doing so.

5. You can access the last image stored on disk from the IP Camera directly.

Image Image

Image

The images you see above are "Real-Time" images that were created when you loaded and viewed this web page not old images from the past, when this Forum post was created. They also create a single image file on the web server for each camera, that is reused and updated when this happens and that file can also be accessed directly as well. If any of the IP Cameras above were offline or not available, then the last image received from that IP Camera would be displayed above automatically.

Again, with no exposure of where the Foscam IP Cameras DDNS, or IP Address that created the image is located or any User Credentials for the Foscam IP Camera that produced the image above.

http://107.170.59.150/ipcam2.jpg

http://107.170.59.150/test/ipcam1.jpg

http://107.170.59.150/test/ipcam4.jpg

If any of the above Foscam IP Cameras were to go offline or become not available. Then the last real-time image received from the Foscam IP camera which was stored on disk. Would instead be used automatically and presented. Instead of a real-time image. This allows nobody to know that your Foscam IP Camera is offline or not available ("Assuming that you are not including date and time in your images").

Only the last real-time image received from your Foscam IP Camera is saved to disk, when using the disk option in the configuration for the Interface. So there is not any file clutter going on with multiple images from the same Foscam IP Camera being saved on disk.

Note: If you use the links above to get the files created by the images above, multiple times. Your browser may cache the files when using the link. Because the request to get the files, are not a unique request. However, the images shown above. Will be unique each and every time your refresh this Forum post web page, because it forces the images to be unique.

Both of these examples are TOTALLY secure methods. Simply using different configuration options available In the Interface. Allowing you to view your Foscam IP Cameras over unsecure Internet connections as well as share images of your Foscam IP Cameras. While providing total ambiguity about your Foscam IP Camera Model and maintaining the privacy of the DDNS, IP Address, Port and User Credentials of your Foscam IP Cameras.

You can create different copies of the Interface configured to be used for different purposes for the same Foscam IP Camera and you can use this Interface to display multiple Foscam IP Cameras at the same time. You can also reference and use any images created by the Interface that are stored on disk as the last image directly.

Secure Images and Refreshed Images Using HTTPS

Note: Even with the Foscam H.264 based IP Camera models that do support HTTPS. There is no requirement to port forward the HTTPS ports for those cameras to use these HTTPS methods with this Interface. Instead the Interface will use your SSL certificate on your Web Site avoiding any certificate warnings. If you have a valid and not self-signed SSL certificate for your Web Site.

The Interface also allows you to access any Foscam IP Camera model even MJPEG based camera models using HTTPS if desired. Accessing your Foscam MJPEG based IP Camera models, using HTTPS is normally not supported.

This can be very helpful if you wish to add your Foscam IP Camera in HTTPS based Web Pages.

Please note the Web Site being used for the examples is using a self-signed certificate which is why you will see a warning when using the example HTTPS links below:

Foscam MJPEG based IP Camera Single Secure Image:

https://107.170.59.150/ipcamera.php

Foscam H.264 based IP Camera Single Secure Image:

https://107.170.59.150/test/SecureImageDisplayH264WithText2.php

Two Foscam MJPEG based IP Cameras With Automatic Secure Image Refresh ("Same camera being used for live demonstration purposes:

https://107.170.59.150/TwoCameras.htm

Two Foscam H.264 based IP Cameras With Automatic Secure Image Refresh:

https://107.170.59.150/test/SecureImageDisplayH264Full2.htm

Secure Profile Pictures

In some cases, if your images are sized correctly. You can even use this Interface as your profile picture in Social Media sites, Blogs, Forums other Web Sites and even with some Instant Messengers. Allowing you to have Real-Time images of your Foscam IP Camera instead of any static images you currently maybe using there.

Complete List With Links To All Live IP Camera Example Demos:

http://107.170.59.150/foscam/

Unsecure Methods

The methods below do not require having access to a web server. The actual HTML code can instead be stored on any browser capable device or even stored as an Email attachment and accessed from any browser capable device as needed. But they are also unsecure and not secure methods as the above examples are.

Here are methods that will work with ANY IP Camera that will simply display refreshed images of your IP Cameras in a web page at your selected refresh rates and sizes. It only requires 1 line of HTML code per camera:

http://foscam.us/forum/a-how-to-embed-any-foscam-ip-camera-in-webpage-using-1-line-t9113.html#p43654

Here are unsecure methods to display and access your Foscam IP Cameras while using PTZ ("Pan/Tilt/Zoom") controls in a webpage as well:

MJPEG Based IP Cameras:

http://foscam.us/forum/post10970.html#p10970

H.264 Based IP Cameras:

http://foscam.us/forum/post20338.html#p20338

Don
Attachments
SecureImageDisplayFI9826W-2USLogo.png
SecureImageDisplayFI9826W-2USLogo.png (113.85 KiB) Viewed 113110 times
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Secure Methods Using PHP To display Your IP Camera

Postby baudwalk » Wed Feb 19, 2014 12:33 pm

Cheers Don,

This will save me a lot of time.

Regards,

George
baudwalk
 
Posts: 7
Joined: Wed Feb 19, 2014 8:18 am

Re: Secure Methods Using PHP To display Your IP Camera

Postby TheUberOverLord » Wed Feb 19, 2014 12:34 pm

baudwalk wrote:Cheers Don,

This will save me a lot of time.

Regards,

George

You are very welcome.

Don
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Secure Methods Using PHP To display Your IP Camera

Postby TheUberOverLord » Thu Feb 20, 2014 10:33 am

To help put things into a better perspective. Normally. If you wanted to add a real-time Snapshot of your Foscam H.264 based IP Camera as an image in a post on a Social Media site, Blog, Forum, Websites or in Emails. That did not allow you to use HTML.

Method used to get picture below:

Code: Select all
[img]http://www.saveontelephonebills.com/camera/snaptime2.php
[/img]

Note: See Above. No IP Camera information of any kind is exposed or used to display this image below.

Image

Note: That the size of the IP Cameras image can be controlled by you as well as optionally including custom text as well as date time information in the actual images automatically.

Which leaves you with the below vs. the method used above:

You could not display a specific size of your H.264 based IP Cameras images. You would be forced to use the IMG tags. As you are here:

Code: Select all
[img]http://50.197.211.181:9821/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=user&pwd=foscam[/img]

Note: See Above. The cameras IP Address, Port, User and Password were exposed in order to display the image below. Using normal methods.

You are also STUCK with the default Snapshot image size as well, when using the normal method. Which in this case is 1280x720 and does NOT fit properly here causing the Snapshots aspect ratio to be skewed.

Image

So. Not only do these methods allow you to include a secure image of your IP Camera in your own web pages. They also allow you to use the same secure methods on other web pages which you post to as well. Including Email.

Another benefit is that you can grab an image from disk vs. always needing to get a fresh real-time image from the IP Camera by setting how old the last image from the IP Camera stored on disk is, in seconds, before you grab a fresh real-time image from the IP Camera.

Using the direct method shown above to pull the Snapshot always directly from the IP Camera. Does not allow this. Meaning that if this web page were to become busy. Using the other method.

Your IP Camera would be hammered with real-time image requests directly to your IP Camera, for each visitor viewing this web page vs. grabbing the IP Cameras most recent image from disk as needed. Until that image on disk became x seconds old. Then and only then, would you go to the IP Camera to get a fresh real-time image from the IP Camera.

Of course. You can always grab a fresh image from the IP Camera in real-time and never be required to store any image from the IP Camera to disk. Depending on the configuration options you use when you configure this.

Also. If one used the direct method above to always get a real-time image directly from the IP Camera and that IP Camera went offline or became unavailable for whatever reason. No image would be displayed in those cases.

However, using these methods. It is possible to serve the last real-time image that was received for the IP Camera and stored on disk when or if the IP Camera was not online or unavailable. If you configure this to store the last IP Cameras real-time image received on disk. Which again is a configuration option.

Only the last real-time image received from the IP Camera is saved to disk, when using the disk option in the configuration for this. So there is not any file clutter going on with multiple images from the IP Camera.

Don
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Secure Methods Using PHP To display Your IP Camera

Postby TheUberOverLord » Thu Feb 27, 2014 11:46 am

Unlike the misunderstood concept that by simply encrypting the HTML source code used to access the IP Camera. Could/Would by itself, protect the IP Cameras, DDNS, IP Address, Port, User Id and Password information from being exposed. Which is not true or correct.

You can use tools like ANY browser debugger included with ANY browser, Fiddler2 or Wireshark to confirm that no information of any kind is exposed about the IP Camera used in these first two secure examples shown here. The third example shown here is a non-secure example.

Fiddler2 was used here to demonstrate. What information a client device would have access to, about the IP Camera being accessed. When that client device is using HTTP and HTML on a client device to access a IP Camera. Using the secure and non-secure methods. With or without HTML encrypted source code. The results would be the same.

Here are also examples of using these methods for totally secure access to your IP Camera with automatically refreshing images by using the php code shown here inside HTML. That works using ANY Internet browser capable devices that are running on any Operating System which are using any browser:

http://107.170.59.150/SecureRefreshWithCustomText.htm

Note: The below is the servers IP Address when the above link is used. NOT the IP Cameras IP Address
Image

Note: There is additional overhead involved in the above example due to modifying the images in real-time with custom text such as date and time.

Whereas leaving the image as it was received cuts down this overhead:

http://107.170.59.150/SecureRefreshWithoutText.htm

Note: The below is the servers IP Address when the above link is used. NOT the IP Cameras IP Address
Image

The above examples. Have no linkage of any kind as to what the IP Cameras DDNS or IP Address, Port, User Id or Password is.

As stated earlier here. These secure examples are substantially much slower then using non-secure methods like the example below. Which also works with any Internet browser capable devices as well. Such as this:

http://107.170.59.150/GenericBIV31.htm

Note: The below IS the IP Cameras Address when the above link is used. Including DDNS, ISP IP Address, User Id and Password Information
Image

Which would still be exposed even with encryption method concepts. When using HTTP and HTML alone from any client device.

This is why php was chosen for these methods. Because not all IP Cameras support HTTPS and even if they did. There are easy methods to get the same IP Camera information using tools like Fiddler2 on the client device side. Whereas by using php. This is not possible.

The results of all the two secure and one insecure methods shown here for IP Camera automatic refresh average turn around times for each image are:

Code: Select all
Secure With Custom Text:    450 Milliseconds
Secure Without Custom Text: 250 Milliseconds
Unsecured:                   44 Milliseconds

Don
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Secure Methods Using PHP To display Your IP Camera

Postby TheUberOverLord » Thu Feb 27, 2014 6:22 pm

Even if you currently don't have a Web Server or Hosting Service to host php examples like this. It's easy to start doing so. For as little as $5 U.S. dollars a month. Using Hosting Services like as just one example DigitalOcean's Digital Cloud SSD ("Solid State Drive") VPS ("Virtual Private Servers") Hosting Services:

Click for Info

Note: If anyone needs help setting something up like this. Please ask here. This was a first for me as well.

Which I used specifically for the examples shown in my prior post here. As to not be subjected to any resource restrictions by a Shared Hosting Service. Which I used for my other prior examples shown here prior to the last examples show in my prior post here and also use normally as well. You can do this without any need use or register any Domain name. Also saving money.

Where you can configure your own flavor of Linux systems and options. To do things like this and also store other data from your IP Cameras. Like your own FTP interface without being subjected to any restrictions a Shared Hosting Service may have. Such as blocked ports, memory usage, process usage and other limits they may impose.

These are the Web Server resources being used with one copy of each example above being run at the same time
Image

Above Web Server was configured for these example with:

Ubuntu 12.04.3 x64 1GB Ram 30GB SSD Disk 2TB Transfer per Month Bandwidth Maximum
Apache/2.2.22 (Ubuntu)
PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch Click to see options
vsftp ("FTP")
Telnet
SSH
HTTPS
MySQL
memcache
swap file
FFmpeg
avconv

The beauty about going this route, for IP Camera owners. Is that you can control every aspect of what software you use for your Web Server as well as stop/start the Web Server as needed to make changes. The IP Address is unique and can be used directly without any Domain name if needed. As the example here is doing.

The Web Server is your personal Web Server. Without being shared by others. So you have a clear view of the resource being used and also knowing that all those resources are your resources. So that you can do Web Server Tuning as well. It can also support as many Domains as you wish. In the event your currently have Web Sites and are under restrictions on a Shared Hosting Plan.

It's a great alternative method to store Snapshots and Videos for your IP Cameras, without the need to run your own system to do so 24/7/365. It also has built-in RAID ("Redundant Array of Independent Disks") so even a disk outage would not cause a loss of IP Camera files. After all the purpose of IP Cameras are security. So, having fault-tolerant disk storage is important. Even more so for multiple IP Cameras.

I also wanted to set the stage for my next posts here. Which will be about providing secure real-time video from your IP Cameras and generating SMS messages, when your IP Cameras detect alarms or go offline or become unavailable.

While many IP Cameras have the ability to tell you when their ISP IP Address changes. None have the ability to tell you that they went offline and are not currently available.

Don
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Showing Secure Methods Using PHP To Display Your IP Came

Postby RobertBell » Mon Mar 10, 2014 12:48 am

Would like to much obliged for imparting this with us..It's favorably working for me.... :mrgreen:
RobertBell
 
Posts: 1
Joined: Mon Mar 10, 2014 12:42 am

Re: Showing Secure Methods Using PHP To Display Your IP Came

Postby RICHARDSD » Tue Mar 11, 2014 7:49 am

To set up this secure methods, is their any easy procedure to implement at home by self? During implementing this method using PHP with wireless IP security systems if some problems persist, then what to do?
RICHARDSD
 
Posts: 16
Joined: Thu Jan 23, 2014 2:05 am

Re: Showing Secure Methods Using PHP To Display Your IP Came

Postby TheUberOverLord » Tue Mar 11, 2014 7:54 am

RobertBell wrote:Would like to much obliged for imparting this with us..It's favorably working for me.... :mrgreen:

You are very welcome.

Don
TheUberOverLord
 
Posts: 13096
Joined: Fri Jun 22, 2012 11:52 pm

Re: Showing Secure Methods Using PHP To Display Your IP Came

Postby Minglarn » Wed Mar 12, 2014 3:15 pm

First I personally want to thank you for this excellent piece of code as our IT at work wont let us to use ports (only port: 80) and this script let me bypass it.

Second, Is there a way with php programming to make the user enter a password to view the live feed?

Regards...
Minglarn
 
Posts: 313
Joined: Sat Jan 12, 2013 8:28 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests