Solved

WebCam setup

Posted on 2000-05-13
4
132 Views
Last Modified: 2010-04-09
I have an application that sends a new .jpg file to my server every 15 seconds (from my camera).  I tried to use:
<meta HTTP-EQUIV="Refresh" CONTENT="15; URL=http://www.zzz.com/webcam.htm">

to make the page refresh every 15 seconds but it doesn't update the picture.  The html is simply a page with a jpg picture.  How can I make the page continue to update when I send a new picture?
0
Comment
Question by:Lee5
  • 2
4 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 2807968
Bu using an image with an additoon ? + randomnumber

ie. with javascript it'd look like:

<script language=javascript>
<!--
var MyImg = new Image();
    function UpdatePic()
    {
       MyImg.src="http://www.mysite.com/image?"+ Math.random();
       document.MyWebcam.src = MyImg.src;    
       setTimeout("UpdatePic()", 150);
    }

setTimeout("UpdatePic()", 150);
//-->
</script>

<img id=MyWebcam>

or something like that. This way you don't even have to use the META refresh tag.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2807971
oops.......i meant to

http://www.mysite.com/image.gif? + Math.random();
0
 

Accepted Solution

by:
semkin earned 50 total points
ID: 2810961
Hi!
We have similar page with web-camera.
Also we use a refresh-method for clients with low speed of connection to the Internet.

Try to make so:

=======================================

<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<meta http-equiv="Refresh" content="15">
<meta http-equiv="Pragma" content="no-cache">
</head>

<body>
<img src="http://www.zzz.com/webcam.jpg" width=* height =* >...

=======================================

Differently go to http://weather.tomsk.net, click on an icon with the camera and look a refresh-method.

Good luck!
Excuse for my bad English.
semkin :)
0
 

Author Comment

by:Lee5
ID: 2813904
Thanks
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question