| |
 |
|
Question:
I use the FTP option to upload live images from multile cameras to my webspace, is there any easy way that I can have my webpages show these cameras as live images?
Answer:
Yes, there is a way to do this:
-
Copy the code between the two horizontal lines below into an empty notepad window.
-
Change the image filenames in the code (shown in red below) to suit your FTP image filepath.
e.g. change t o:
"http://www.mysite.com/ftp-folder/image1.jpg"
"http://www.mysite.com/ftp-folder/image2.jpg"
etc.
-
Save the notepad text as a HTM file named whatever you like, e.g. "camviewer.htm" .
-
Upload the HTM file to your webspace using FTP or your webspace management pages online. You can place the page wherever you want.
-
Now you can view the page by simply typing its URL (web address) into any web browser.
e.g. "www.mysite.com/camviewer.htm"
|
<!--------------------------------------------------->
<!-- 4 CAM VIEWER FOR CAM WIZARD (WWW.CWZD.COM) -->
<!-- HERES THE JAVASCRIPT THAT REFRESHES THE IMAGE -->
<!-- -->
<!-- CREATED BY www.LEDSET.com Software -->
<!--------------------------------------------------->
<script language="JavaScript" type="text/JavaScript">
var Mutex = 0;
function loadImage()
{
if(Mutex == 0)
{
Mutex = 1;
var tag = "?t=";
tag += (new Date()).getTime();
document.images.IMAGEX.src = ImageSource + tag;
setTimeout('loadImage()',1000);
Mutex = 0;
}
}
function setCam(imageSource)
{
ImageSource = imageSource;
}
<!-- INITIALISE SCRIPT TO DEFAULT TO CAM1 -->
setCam( 'http://www.myspace.com/ftp_dir/image1.jpg' );
setTimeout('loadImage()',1000);
</script><!-- SETUP PAGE STYLE CSS -->
<style type="text/css">
<!--
body,td,th
{
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #333333;
font-size: 12px;
}
-->
</style>
<div align="center">
<!-- HERES WHAT HAPPENS WHEN NO JAVASCRIPT IS ENABLED -->
<noscript>
Please Enable JavaScript to see the live feed update automatically! <br>
</noscript>
<!-- HERES THE IMAGE PLACED ON THE WEBPAGE -->
<img src= 'http://www.myspace.com/ftp_dir/image1.jpg' name="IMAGEX" id="IMAGEX">
<br>
<br>
<!-- HERES THE CAM SELECTION LINKS ON THE WEBPAGE -->
<a href="javascript:setCam( 'http://www.myspace.com/ftp_dir/image1.jpg' )">Cam 1</a>
<a href="javascript:setCam( 'http://www.myspace.com/ftp_dir/image2.jpg' )">Cam 2</a>
<a href="javascript:setCam( 'http://www.myspace.com/ftp_dir/image3.jpg' )">Cam 3</a>
<a href="javascript:setCam( 'http://www.myspace.com/ftp_dir/image4.jpg' )">Cam 4</a>
<br>
<br>
<!-- HERES A LINK TO CAM WIZARDS HOMEPAGE -->
Live feed created with
<a href="http://www.CWZD.com"> CAM Wizard </a>
</div>
<!-- END OF VIEWER PAGE -->
|
|
|
|
|