Solved

WebCam setup

Posted on 2000-05-13
4
133 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

828 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