Código:
  
Ojo la dirección de la toma instantánea se define arriba del script ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demostración de cámara IP www.Foscam.es</title>
</head>
<script type='text/javascript'> 
	var URL='http://<?php echo"$url:$puerto/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=$user&pwd=$pass";?>'; 
	var L=window.location.search; 
	L=L.substring(1,5); 
	if(L=="")L=1; 
	NuevaImagen=new Image(); 
	var I=new Date().getTime(); 
	var imgW=640*L; 
	function Refresca(){document.getElementById("Mostrada").src=URL+'&'+I++;} 
</script> 
</head> 
<body onload=Refresca()> 
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="640" height="360" bgcolor="#FF9900" > 
  <tr> 
    <td width="640" height="80" align="center"> 
		<h2>Demostración de cámara IP <a href="http://www.foscam.es" target="_blank">www.foscam.es</a></h2>
    </td> 
  </tr> 
  <tr> 
    <td width="640" height="360"> 
    <img id="Mostrada" border=0 onload=setTimeout("Refresca()",10) onerror=setTimeout("Refresca()",100)> 
   </td> 
  </tr> 
</table> 
</div> 
</body> 
</html>
 
 





