View Single Post
  #4 (permalink)  
Old 02-25-2008, 11:18 AM
Alan-Hart's Avatar
Alan-Hart Alan-Hart is offline
WebProWorld Member
 

Join Date: Jun 2007
Location: Swindon
Posts: 59
Alan-Hart RepRank 0
Default Re: Live Camera Feed to Web Page

This software (http://www.pysoft.com/ActiveWebCamMainpage.htm) can do the ftp upload for you then you just need some javascript to display and update the image every xx seconds

This JavaScript will load new images from a 640 × 480 webcam as fast as your connection (or the server's) can supply them, without caching problems. It requires the "document.images" object, though could easily be updated for more modern DOMs by using document.getElementWithId().

<script type="text/javascript" language="JavaScript">
newImage = new Image();
function LoadNewImage()
{
var unique = new Date();
document.images.webcam.src = newImage.src;
newImage.src = "http://path/to/webcam.jpeg?time=" + unique.getTime();
}
function InitialImage()
{
var unique = new Date();
newImage.onload = LoadNewImage;
newImage.src = "http://path/to/webcam.jpeg?time=" + unique.getTime(); document.images.webcam.onload="";
}
</script>
<img src="http://path/to/webcam.jpeg" name="webcam" onload="InitialImage()" width="640" height="480">
Reply With Quote