CVS: phpweather currentimage.php,NONE,1.1
Brought to you by:
iridium
From: Max H. <ir...@us...> - 2002-06-04 12:11:31
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv22949 Added Files: currentimage.php Log Message: New file to return the current sky image as an image directly. See file for usage notes. --- NEW FILE --- <?php /* * currentimage.php * Return the current weather icon directly. - Can be used from * HTML rather than PHP files. * * Use: <img src="currentimage.php?icao=abcd" /> in your html * */ error_reporting(E_NONE); require('phpweather.php'); $weather = new phpweather(array()); $weather->set_icao($icao); include(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $icons = new pw_images($weather, array()); header('Content-Type: image/gif'); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 readfile($icons->get_sky_image()); ?> |