<?php
 
/**
 
 * This file provides a simple test application
 
 * 
 
 * @author Maik Greubel <[email protected]>
 
 */
 
require 'WebcamFetch.php';
 
 
try
 
{
 
  // Hopefully this cam is accessible for free (link taken from http://www.webcams.travel/webcam/1306724646-Weather-Acapulco-Icacos)
 
  $webcam = new WebcamFetch("http://webcamsdemexico.net/acapulco1/live.jpg", 80, "acapulco.jpeg", 300);
 
  $webcam->checkIsNew();
 
  $webcam->retrieve();
 
  $webcam->shrink();
 
  
 
  // If you want to use the script in your own website and not in cronjob, you honestly want to send the data to client...
 
  //$webcam->sendToClient(); 
 
}
 
catch(Exception $ex)
 
{
 
  printf("%s occured: %s\n%s\n", get_class($ex), $ex->getMessage(), $ex->getTraceAsString());
 
}
 
 |