phpweather-checkins Mailing List for PHP Weather (Page 8)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(1) |
Feb
(1) |
Mar
(184) |
Apr
(31) |
May
(45) |
Jun
(15) |
Jul
(11) |
Aug
(40) |
Sep
(19) |
Oct
(8) |
Nov
(6) |
Dec
(17) |
2003 |
Jan
(5) |
Feb
|
Mar
(12) |
Apr
(5) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(17) |
Oct
(10) |
Nov
|
Dec
(4) |
2004 |
Jan
(21) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin G. <gim...@us...> - 2002-08-26 23:09:30
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv29796 Modified Files: pw_text.php Log Message: Same effect, but easier to understand, IMHO. Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- pw_text.php 16 May 2002 19:46:19 -0000 1.13 +++ pw_text.php 26 Aug 2002 23:09:25 -0000 1.14 @@ -1161,7 +1161,7 @@ * @param array Data taken from decode_metar() * @access public */ - function get_metar_value($index,$index2='',$index3='') { + function get_metar_value($index,$index2 = false, $index3 = false) { // We use our own weather-object. $data = $this->weather->decode_metar(); if ($index3){ |
From: Max H. <ir...@us...> - 2002-08-26 21:48:28
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv2594 Modified Files: index.php Log Message: Changed text for alt tag, thanks to Ondrej Jombik Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- index.php 26 Aug 2002 16:00:37 -0000 1.34 +++ index.php 26 Aug 2002 21:48:23 -0000 1.35 @@ -1,5 +1,5 @@ <?php -error_reporting(E_ALL); +error_reporting(E_ERROR); /* We store the time */ $start_time = explode(' ', microtime()); @@ -86,7 +86,7 @@ '" height="40" width="40" border="1" alt="Current wind in ' . $weather->get_location() . '" /> ' . '<img src="' . $icons->get_temp_image() . - '" height="50" width="20" border="1" alt="Current weather in ' . + '" height="50" width="20" border="1" alt="Current temperature in ' . $weather->get_location() . '" />' . "\n</blockquote>\n" . "<p>The raw METAR is <code>" . |
From: Martin G. <gim...@us...> - 2002-08-26 19:44:52
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv23980 Modified Files: phpweather.inc config-dist.inc Log Message: This patch from Reini Urban <ru...@x-...> adds support for the PHP database (dbm-style) abstraction layer. Also, the pretty_print_metar() function is now a wrapper around get_pretty_print_metar() which ends by returning the pretty print instead of printing it. Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- phpweather.inc 12 Aug 2002 23:59:16 -0000 1.11 +++ phpweather.inc 26 Aug 2002 19:44:40 -0000 1.12 @@ -38,6 +38,15 @@ $useDBM = 0; /* turn off so rest of program won't use */ } +} elseif ($useDBA) { + /* Open the DBM databases: */ + $dbmMetar = dba_open ("metar", "c", $DBAmethod); + $dbmTimestamp = dba_open ("metarTimestamp", "c", $DBAmethod); + if (!$dbmMetar || !$dbmTimestamp) { + echo "<p>Unable to open DBA files!</p>"; + $useDBA = 0; /* turn off so rest of program won't use */ + } + } elseif ($usePSQL) { /* Make a connection to the PostgreSQL database: */ $conn = pg_Connect("host=$db_hostname dbname=$db_name port=5432 " . @@ -109,7 +118,7 @@ * Meteorological Handbook No. 1 for code groups P, 6 and 7) used in * several places, so standardized in one function. */ - if ($precip_mm>0) { + if ($precip_mm > 0) { $amount = sprintf($strings['mm_inches'], $precip_mm, $precip_in); } else { $amount = $strings['a_trace']; @@ -154,11 +163,18 @@ function pretty_print_metar($metar, $location) { + /* + * This is just a wrapper for the get_pretty_print_metar() function. + */ + print(get_pretty_print_metar($metar, $location)); +} + +function get_pretty_print_metar($metar, $location) { global $strings; /* * The main pretty-print function. * You should pass a metar and a location, eg. 'Aalborg, - * Denmark'. That produces something like this: + * Denmark'. It then returns something like this: * * 14 minutes ago, at 12:20 UTC, the wind was blowing at a speed * of 4.6 meters per second (10.4 miles per hour) from West in @@ -175,8 +191,7 @@ if (!$metar) { /* We don't want to display all sorts of silly things if the metar is empty. */ - printf($strings['no_data'], $location); - return; + return sprintf($strings['no_data'], $location); } @@ -333,24 +348,34 @@ $weather_str = ''; } - printf($strings['pretty_print_metar'], - $minutes_old, - $gmtime, - $wind_str, - $location, - $data['temp_c'], - $data['temp_f'], - $windchill_str, - $data['altimeter_hpa'], - $data['altimeter_inhg'], - $data['rel_humidity'], - $sky_str, - $visibility, - $runway_str, - $weather_str, - $prec_str, - $temp_str); + return sprintf($strings['pretty_print_metar'], + $minutes_old, + $gmtime, + $wind_str, + $location, + $data['temp_c'], + $data['temp_f'], + $windchill_str, + $data['altimeter_hpa'], + $data['altimeter_inhg'], + $data['rel_humidity'], + $sky_str, + $visibility, + $runway_str, + $weather_str, + $prec_str, + $temp_str); +} + + +// catch output into buffer and return it as string +function pretty_print_metar_string($metar, $location) { + ob_start(); + pretty_print_metar($metar, $location); + $m = ob_get_contents(); + ob_end_clean(); + return $m; } function pretty_print_metar_wap($metar, $location) { @@ -386,7 +411,7 @@ * Aalborg, Denmark. */ - global $useOCI, $useMySQL, $useDBM, $usePSQL, $conn, $dbmMetar, + global $useOCI, $useMySQL, $useDBM, $useDBA, $usePSQL, $conn, $dbmMetar, $dbmTimestamp, $useXML, $XMLMetar, $XMLParser, $XMLFile; if ($useMySQL) { @@ -404,10 +429,16 @@ } } elseif ($useDBM) { if (dbmexists($dbmMetar, $station) && - dbmexists ($dbmTimestamp, $station)) { /* found station */ + dbmexists ($dbmTimestamp, $station)) { /* found station */ $metar = dbmfetch ($dbmMetar, $station); $timestamp = dbmfetch($dbmTimestamp, $station); } + } elseif ($useDBA) { + if (dba_exists($station, $dbmMetar) && + dba_exists ($station, $dbmTimestamp)) { /* found station */ + $metar = dba_fetch ($station, $dbmMetar); + $timestamp = dba_fetch($station, $dbmTimestamp); + } } elseif ($useOCI) { $query = "SELECT metar,(timestamp-to_date('01-JAN-70','DD-MON-YY')) time_stamp FROM metars WHERE station='$station'"; $stmt = OCIParse($conn,$query); @@ -448,7 +479,7 @@ * metar. The new METAR is returned. */ global $useMySQL, $usePSQL, $useOCI, $conn, - $useDBM, $dbmMetar, $dbmTimestamp, + $useDBM, $useDBA, $dbmMetar, $dbmTimestamp, $useProxy, $proxy_host, $proxy_port, $useXML, $XMLMetar, $XMLParser, $XMLFile; @@ -492,7 +523,7 @@ $date = trim($file[0]); $metar = trim($file[1]); for ($i = 2; $i < count($file); $i++) { - $metar .= ' ' . trim($file[$i]); + $metar .= ' ' . trim($file[i]); } /* The date is in the form 2000/10/09 14:50 UTC. This seperates @@ -552,6 +583,18 @@ "timestamp='$date' WHERE station='$station'"; } pg_exec($conn,$query); + } elseif ($useDBA) { + if ($new) { + /* Insert the new record */ + dba_insert ($station, $metar, $dbmMetar); + dba_insert ($station, $date_unixtime, $dbmTimestamp); + dba_sync ($dbmMetar); dba_sync ($dbmTimestamp); + } else { + /* Update the old record */ + dba_replace ($station, $metar, $dbmMetar); + dba_replace ($station, $date_unixtime, $dbmTimestamp); + dba_sync ($dbmMetar); dba_sync ($dbmTimestamp); + } } elseif ($useDBM) { if ($new) { /* Insert the new record */ @@ -963,7 +1006,7 @@ number_format($decoded_metar['temp_c'] + 5/9 * ($e - 10),1); $decoded_metar['humidex_f'] = number_format($decoded_metar['humidex_c'] * 9/5 + 32, 1); - + /* * Windchill. * @@ -1006,7 +1049,7 @@ * refreshed the page, the new weather will be shown. */ - global $useMySQL, $useDBM, $usePSQL, $conn, $dbmMetar, $dbmTimestamp; + global $useMySQL, $useDBM, $useDBA, $usePSQL, $conn, $dbmMetar, $dbmTimestamp; global $useXML, $XMLMetar, $XMLParser, $XMLFile; if ($useMySQL) { @@ -1029,7 +1072,13 @@ $station = dbmfirstkey($dbmMetar); while ($station) { fetch_metar($station, 0); - $station = dmbnextkey($dbmMetar, $station); + $station = dbmnextkey($dbmMetar, $station); + } + } elseif ($useDBA) { + $station = dba_firstkey($dbmMetar); + while ($station) { + fetch_metar($station, 0); + $station = dba_nextkey($dbmMetar); } } elseif ($useOCI) { $query = "SELECT station FROM metars"; Index: config-dist.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/config-dist.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- config-dist.inc 17 May 2002 22:10:43 -0000 1.1 +++ config-dist.inc 26 Aug 2002 19:44:40 -0000 1.2 @@ -35,6 +35,11 @@ /* set to 1 to use XML */ $useXML = 0; +/* set to 1 to use a DBA database */ +$useDBA = 0; +/* the DBA handler to use, if $useDBA is set to 1: */ +$DBAmethod = 'db2'; // or ndbm, gdbm, db3 if db2 doesn't work. + /* If you're using a database that requires you to log on, then set * the following variables. Make sure to protect the 'config.php' file * so that other people cannot read your password! |
From: Martin G. <gim...@us...> - 2002-08-26 16:56:30
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv28530 Modified Files: README README-CVS Log Message: Minor fixes. Index: README =================================================================== RCS file: /cvsroot/phpweather/phpweather/README,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- README 27 Mar 2002 10:59:33 -0000 1.13 +++ README 26 Aug 2002 16:56:27 -0000 1.14 @@ -5,14 +5,15 @@ What is PHP Weather? -------------------- -PHP Weather makes it easy to show the current weather on your -webpage. All over the world airports make a so-called METAR-report -once an hour. A METAR report is an aviation weather report to be used -primarily by airplanes. The report contains data, in a shorthand form, -about temperature, wind speed and direction, cloud-coverage and much -more. PHP Weather converts this format into both imperial and metric -units, caches the data in MySQL, Postgres or DBM database for fast -retrieval, and makes them easily available in PHP scripts. +PHP Weather is a script that makes it easy to show the current weather +on your webpage. Airports all over the world make a so-called METAR +report once an hour. A METAR report is an aviation weather report to +be used primarily by airplanes. The report contains data, in a +shorthand form, about temperature, wind speed and direction, +cloud-coverage and much more. PHP Weather converts this format into +both imperial and metric units, caches the data in MySQL, Postgres or +DBM database for fast retrieval, and makes them easily available in +PHP scripts. Installation @@ -27,29 +28,30 @@ o Shows the current weather in natural language. o Caches the result to increase performance. - o MySQL, PostgreSQL DBM databases are supported. + o MySQL, PostgreSQL, and DBM databases are supported. o Supports several languages. If your language isn't here, you can add a translation. - o Can be used with WAP-phones. Example-page is included. -Please see http://www.phpweather.net/ for full details and -examples. +Please see http://www.phpweather.net/ for full details and examples. -How to contact me +How to contact us ----------------- -If you find a bug or have a feature request for PHP Weather, please -don't hesitate to report it at http://sourceforge.net/projects/phpweather/ -We have a mailing list for general discussions about PHP Weather, -but before you can send mails to the list, you have to subscribe -to it - go to this page to subscribe: +If you find a bug or have a feature request for PHP Weather, please +don't hesitate to report it at SourceForge using the Bug Tracker: + + http://sourceforge.net/tracker/?group_id=23245&atid=377952 + +We have a mailing list for general discussions about PHP Weather, but +before you can send mails to the list, you have to subscribe to it - +go to this page to subscribe: http://lists.sourceforge.net/lists/listinfo/phpweather-devel -If PHP Weather is decoding a METAR incorrectly, please remember to -include that METAR you're having problems with when you send a -message or submit a bug. Without it, we can't really help you. +If the problem you're reporting has to do with the decoding of a +specific METAR report, then please remember to include the METAR in +your report. Without it, we can't really help you. You can always get the newest version at - http://phpweather.sourceforge.net + http://www.phpweather.net/ Index: README-CVS =================================================================== RCS file: /cvsroot/phpweather/phpweather/README-CVS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- README-CVS 8 Jul 2001 16:09:34 -0000 1.3 +++ README-CVS 26 Aug 2002 16:56:27 -0000 1.4 @@ -1,16 +1,19 @@ ************************************************************************ * PHP Weather - a METAR decoder * ************************************************************************ -This is the CVS version of PHP Weather - use at your own risk :-) -It should work most of the time. You should follow the CVS -commits-maillinglist if you're interested in getting email every time -CVS has changed: +Since you have this file, you must be using a CVS version of PHP +Weather. The CVS version contains the latest ideas but also the latest +bugs... + +It should work most of the time, but don't be too surprised if it +doesn't. You should follow the CVS commits-maillinglist if you're +interested in getting email every time CVS has changed: http://lists.sourceforge.net/lists/listinfo/phpweather-checkins By subscribing to that list you'll stand a better chance of -understanding how PHP Weather works, since the changes are described in -the messages. +understanding how PHP Weather works, since the changes are described +in the messages. -- Martin Geisler <gim...@gi...> |
From: Martin G. <gim...@us...> - 2002-08-26 16:00:42
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv6004 Modified Files: index.php Log Message: There's no need (in PHP version 4) to supply an empty array to functions that already default to the empty array. Also, use English as the default language. Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- index.php 26 Aug 2002 14:56:58 -0000 1.33 +++ index.php 26 Aug 2002 16:00:37 -0000 1.34 @@ -7,7 +7,7 @@ require('phpweather.php'); require('pw_utilities.php'); -$weather = new phpweather(array()); +$weather = new phpweather(); $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" @@ -46,7 +46,7 @@ stations in that country. */ if (empty($icao)) $icao = ''; - if (empty($language)) $language = ''; + if (empty($language)) $language = 'en'; $output .= '<form action="index.php" method="get">' . "\n<p>" . '<input type="hidden" name="action" value="show_weather" /> ' . @@ -70,10 +70,10 @@ $weather->set_icao($icao); include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); $type = 'pw_text_' . $language; - $text = new $type($weather, array()); + $text = new $type($weather); include(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); - $icons = new pw_images($weather, array()); + $icons = new pw_images($weather); $output .= '<p>This is the current weather in ' . $weather->get_location() . ":</p>\n<blockquote>\n" . |
From: Martin G. <gim...@us...> - 2002-08-26 15:56:52
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv5033 Modified Files: make-release.sh Log Message: Make some scripts quiet. Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- make-release.sh 26 Aug 2002 13:04:46 -0000 1.6 +++ make-release.sh 26 Aug 2002 15:56:49 -0000 1.7 @@ -9,49 +9,57 @@ # # The files are placed in the current directory. -echo -n "Retrieving snapshot... " +echo -n "Retrieving snapshot from SourceForge CVS... " cvs -Q -z3 -d:pserver:ano...@cv...:/cvsroot/phpweather export -kv -r HEAD -d phpweather.$$ phpweather echo "done." -echo -n "Cleaning... " +echo -n "Inserting version number and timestamp into files... " cd phpweather.$$ || exit VERSION=$(cat VERSION) DATE=$(date -uI) -rm README-CVS VERSION make-release.sh usermap $(find . -name '.cvsignore') +rm README-CVS VERSION make-release.sh +rm usermap $(find . -name '.cvsignore') for file in README INSTALL base_object.php doc/src/phpweather.texi; do sed -e "s/#VERSION#/$VERSION/g" -e "s/#DATE#/$DATE/g" $file > tmp mv -f tmp $file done +echo "done." + cd doc || exit -texi2dvi src/phpweather.texi +echo -n "Generating phpweather.dvi... " +texi2dvi -q -c src/phpweather.texi +echo "done." -texi2pdf src/phpweather.texi +echo -n "Generating phpweather.pdf... " +texi2pdf -q -c src/phpweather.texi +echo "done." +echo -n "Generating phpweather.html... " texi2html src/phpweather.texi +echo "done." -dvips phpweather.dvi -o +echo -n "Generating phpweather.ps... " +dvips -q phpweather.dvi -o phpweather.ps +echo "done." +echo -n "Generating phpweather.info... " makeinfo src/phpweather.texi +echo "done." +echo -n "Generating phpweather.txt... " makeinfo --no-headers src/phpweather.texi -o phpweather.txt - -for extension in aux cp cps fn ky log pg ps toc tp vr; do - rm phpweather.$extension -done +echo "done." cd ../.. mv phpweather.$$ phpweather-$VERSION -echo "done." - - echo -n "Creating phpweather-$VERSION.tar.gz... " tar -cz phpweather-$VERSION -f phpweather-$VERSION.tar.gz echo "done." @@ -74,8 +82,10 @@ phpweather-$VERSION.tar.bz2 \ phpweather-$VERSION.zip echo "done." + + echo -n "Removing phpweather-$VERSION... " + rm -R phpweather-$VERSION + echo "done." + fi -echo -n "Removing phpweather-$VERSION... " -rm -R phpweather-$VERSION -echo "done." |
From: Martin G. <gim...@us...> - 2002-08-26 15:55:56
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv4639 Modified Files: test.php Log Message: More useful test page. Index: test.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/test.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- test.php 12 May 2002 15:09:30 -0000 1.4 +++ test.php 26 Aug 2002 15:55:53 -0000 1.5 @@ -1,34 +1,62 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> - +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"DTD/xhtml1-transitional.dtd"> <html> <head> - <title>PHPWeather test configuration file</title> + <link rel="stylesheet" type="text/css" href="pw_style.css" /> + <title>PHP Weather - Test Page</title> </head> - <body> + +<img src="icons/phpweather-long-white.gif" width="187" height="50" +alt="PHP Weather" align="right" /> + +<h1>PHP Weather Test Page</h1> + +<p>You can use this page to test a specific METAR report. Enter the +report below, select a language and see how PHP Weather handles the +report:</p> + <?php error_reporting(E_ALL); +/* Load PHP Weather */ require('phpweather.php'); +/* Load utilities to make forms */ require('pw_utilities.php'); -$weather = new phpweather(array()); -$weather->set_metar('RPLL 121400Z 13010KT 9999 FEW025 28/21 Q1011 A 29.86 NOSIG'); +if (empty($language)) $language = 'en'; -$language = "en"; +$weather = new phpweather(); - require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); - require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); - $type = 'pw_text_' . $language; - $text = new $type($weather, array()); - -echo $text->print_pretty() . "<br />\n"; -$icons = new pw_images($weather, array()); -echo '<img src="'.$icons->get_sky_image().'" />'; -echo '<img src="'.$icons->get_winddir_image().'" />'; -echo '<img src="'.$icons->get_temp_image().'" />'; ?> +<form action="test.php" method="GET"> +<p>Metar: <input type="text" name="metar" size="60" + value="<?php if (!empty($metar)) echo $metar; ?>"></p> +<p>Language: <?php echo get_languages_select($weather, $language); ?> +<input type="submit"></p> +</form> + +<?php +if (!empty($metar)) { + + $weather->set_metar($metar); + + require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); + require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); + + $type = 'pw_text_' . $language; + $text = new $type($weather); + + echo "<blockquote>\n" . $text->print_pretty() . "</blockquote>\n"; + + $icons = new pw_images($weather); + echo '<p><img src="'.$icons->get_sky_image().'" /> '; + echo '<img src="'.$icons->get_winddir_image().'" /> '; + echo '<img src="'.$icons->get_temp_image().'" /></p>'; +} + +?> </body> </html> |
From: Martin G. <gim...@us...> - 2002-08-26 14:57:03
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv14990 Modified Files: index.php Log Message: Links to documentation. Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- index.php 29 May 2002 20:11:09 -0000 1.32 +++ index.php 26 Aug 2002 14:56:58 -0000 1.33 @@ -105,8 +105,18 @@ $end_time = explode(' ', microtime()); $diff = ($end_time[0] + $end_time[1]) - ($start_time[0] + $start_time[1]); -echo '<p>Total time used to generate page: ' . number_format($diff * 1000, 0) . " ms.</p>\n"; ?> + +<p>PHP Weather comes with some documentation that you'll probably want +to see. Choose the format: +[<a href="doc/phpweather.html">html</a>] +[<a href="doc/phpweather.pdf">pdf</a>] +[<a href="doc/phpweather.ps">ps</a>] +[<a href="doc/phpweather.txt">txt</a>].</p> + +<p>Total time used to generate page: +<?php echo number_format($diff * 1000, 0) ?> ms.</p> + </body> </html> |
From: Martin G. <gim...@us...> - 2002-08-26 13:29:39
|
Update of /cvsroot/phpweather/phpweather/doc In directory usw-pr-cvs1:/tmp/cvs-serv14072 Added Files: phpweather.ps Log Message: Let's not forget this one... --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-08-26 13:17:12
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv9231 Modified Files: pw_db_dba.php Log Message: Sort this as well. Index: pw_db_dba.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_dba.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- pw_db_dba.php 26 Mar 2002 18:50:06 -0000 1.7 +++ pw_db_dba.php 26 Aug 2002 13:17:09 -0000 1.8 @@ -352,6 +352,9 @@ explode(':', dba_fetch($icao, $this->link_stations_id)); $locations[$icao] = $location; } + + asort($locations); + return $locations; } |
From: Martin G. <gim...@us...> - 2002-08-26 13:16:29
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv8969 Modified Files: pw_db_common.php Log Message: A little clarity. Index: pw_db_common.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- pw_db_common.php 26 Mar 2002 18:52:43 -0000 1.11 +++ pw_db_common.php 26 Aug 2002 13:16:26 -0000 1.12 @@ -103,8 +103,8 @@ /* The ICAO is always the first four characters in the METAR: */ $icao = substr($metar, 0, 4); - if (list($m, $t) = $this->get_metar($icao)) { - if ($t < $timestamp && $m != $metar) { + if (list($db_metar, $db_timestamp) = $this->get_metar($icao)) { + if ($db_timestamp < $timestamp && $db_metar != $metar) { /* The METAR in the database is older than the new METAR, so * we go ahead with the update: */ $this->update_metar($icao, $metar, $timestamp); |
From: Martin G. <gim...@us...> - 2002-08-26 13:15:25
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv8161 Modified Files: phpweather.php Log Message: When we read the directory, we get the entries in a somewhat random order. This gives a better display in the dropdown boxes. Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- phpweather.php 26 Aug 2002 13:12:58 -0000 1.30 +++ phpweather.php 26 Aug 2002 13:15:23 -0000 1.31 @@ -87,7 +87,9 @@ } closedir($dir); } - + + asort($output); + return $output; } |
From: Martin G. <gim...@us...> - 2002-08-26 13:13:01
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv7529 Modified Files: phpweather.php Log Message: A little cache to prevent rereading the directory. Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- phpweather.php 12 Aug 2002 23:52:03 -0000 1.29 +++ phpweather.php 26 Aug 2002 13:12:58 -0000 1.30 @@ -71,16 +71,23 @@ * @access public */ function get_languages($type) { - require(PHPWEATHER_BASE_DIR . '/languages.php'); - $this->debug("Finding language for $type"); - $dir = opendir(PHPWEATHER_BASE_DIR . '/output'); - while($file = readdir($dir)) { - if (ereg("^pw_${type}_([a-z][a-z])\.php$", $file, $regs)) { - $output[$regs[1]] = $languages[$regs[1]]; + static $output = array(); + + if (empty($output)) { + + require(PHPWEATHER_BASE_DIR . '/languages.php'); + $this->debug("Finding language for $type"); + + $dir = opendir(PHPWEATHER_BASE_DIR . '/output'); + while($file = readdir($dir)) { + if (ereg("^pw_${type}_([a-z][a-z])\.php$", $file, $regs)) { + $output[$regs[1]] = $languages[$regs[1]]; + } } + closedir($dir); } - closedir($dir); + return $output; } |
From: Martin G. <gim...@us...> - 2002-08-26 13:04:49
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv4905 Modified Files: make-release.sh Log Message: Better release script. Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- make-release.sh 20 May 2002 15:50:15 -0000 1.5 +++ make-release.sh 26 Aug 2002 13:04:46 -0000 1.6 @@ -15,19 +15,37 @@ echo -n "Cleaning... " -cd phpweather.$$ +cd phpweather.$$ || exit VERSION=$(cat VERSION) DATE=$(date -uI) -rm README-CVS VERSION make-release.sh $(find . -name '.cvsignore') +rm README-CVS VERSION make-release.sh usermap $(find . -name '.cvsignore') -for file in README INSTALL base_object.php; do +for file in README INSTALL base_object.php doc/src/phpweather.texi; do sed -e "s/#VERSION#/$VERSION/g" -e "s/#DATE#/$DATE/g" $file > tmp mv -f tmp $file done -cd .. +cd doc || exit + +texi2dvi src/phpweather.texi + +texi2pdf src/phpweather.texi + +texi2html src/phpweather.texi + +dvips phpweather.dvi -o + +makeinfo src/phpweather.texi + +makeinfo --no-headers src/phpweather.texi -o phpweather.txt + +for extension in aux cp cps fn ky log pg ps toc tp vr; do + rm phpweather.$extension +done + +cd ../.. mv phpweather.$$ phpweather-$VERSION |
From: Martin G. <gim...@us...> - 2002-08-26 12:56:55
|
Update of /cvsroot/phpweather/phpweather/docs/src/xml In directory usw-pr-cvs1:/tmp/cvs-serv2061/src/xml Removed Files: class_base_object.xml class_data_retrieval.xml class_db_common.xml class_db_dba.xml class_db_layer.xml class_db_mysql.xml class_db_null.xml class_db_pgsql.xml class_locale_common.xml class_locale_da.xml class_locale_en.xml class_locale_hu.xml class_metar_parser.xml class_phpweather.xml class_property.xml classtree_base_object.xml classtree_property.xml elementlist.xml packagelist.xml phpdoc.dtd warnings_classanalyser.xml warnings_parser.xml Log Message: Away with these files - they can be regenerated if anybody needs them. Also, I'm moving the documentation to Texinfo. --- class_base_object.xml DELETED --- --- class_data_retrieval.xml DELETED --- --- class_db_common.xml DELETED --- --- class_db_dba.xml DELETED --- --- class_db_layer.xml DELETED --- --- class_db_mysql.xml DELETED --- --- class_db_null.xml DELETED --- --- class_db_pgsql.xml DELETED --- --- class_locale_common.xml DELETED --- --- class_locale_da.xml DELETED --- --- class_locale_en.xml DELETED --- --- class_locale_hu.xml DELETED --- --- class_metar_parser.xml DELETED --- --- class_phpweather.xml DELETED --- --- class_property.xml DELETED --- --- classtree_base_object.xml DELETED --- --- classtree_property.xml DELETED --- --- elementlist.xml DELETED --- --- packagelist.xml DELETED --- --- phpdoc.dtd DELETED --- --- warnings_classanalyser.xml DELETED --- --- warnings_parser.xml DELETED --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:56:54
|
Update of /cvsroot/phpweather/phpweather/docs/src/latex In directory usw-pr-cvs1:/tmp/cvs-serv2061/src/latex Removed Files: .cvsignore apidoc.tex databases.tex decoded.tex fdl.tex history.tex installation.tex intro.tex main.tex phpweather-a4.tex phpweather-letter.tex translation.tex Log Message: Away with these files - they can be regenerated if anybody needs them. Also, I'm moving the documentation to Texinfo. --- .cvsignore DELETED --- --- apidoc.tex DELETED --- --- databases.tex DELETED --- --- decoded.tex DELETED --- --- fdl.tex DELETED --- --- history.tex DELETED --- --- installation.tex DELETED --- --- intro.tex DELETED --- --- main.tex DELETED --- --- phpweather-a4.tex DELETED --- --- phpweather-letter.tex DELETED --- --- translation.tex DELETED --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:56:54
|
Update of /cvsroot/phpweather/phpweather/docs/ps In directory usw-pr-cvs1:/tmp/cvs-serv2061/ps Removed Files: .cvsignore phpweather-a4.ps phpweather-letter.ps Log Message: Away with these files - they can be regenerated if anybody needs them. Also, I'm moving the documentation to Texinfo. --- .cvsignore DELETED --- --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:56:54
|
Update of /cvsroot/phpweather/phpweather/docs/src In directory usw-pr-cvs1:/tmp/cvs-serv2061/src Removed Files: make-docs.sh php.ini phpdoc2latex.php Log Message: Away with these files - they can be regenerated if anybody needs them. Also, I'm moving the documentation to Texinfo. --- make-docs.sh DELETED --- --- php.ini DELETED --- --- phpdoc2latex.php DELETED --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:56:52
|
Update of /cvsroot/phpweather/phpweather/docs/pdf In directory usw-pr-cvs1:/tmp/cvs-serv2061/pdf Removed Files: .cvsignore phpweather-a4.pdf phpweather-letter.pdf Log Message: Away with these files - they can be regenerated if anybody needs them. Also, I'm moving the documentation to Texinfo. --- .cvsignore DELETED --- --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:54:45
|
Update of /cvsroot/phpweather/phpweather/docs/html In directory usw-pr-cvs1:/tmp/cvs-serv1278 Removed Files: base_object.html class_base_object.xml class_data_retrieval.xml class_db_layer.xml class_phpweather.xml class_property.xml class_pw_db_common.xml class_pw_db_dba.xml class_pw_db_mysql.xml class_pw_db_null.xml class_pw_db_pgsql.xml class_pw_dependency.xml class_pw_dependency_or.xml class_pw_images.xml class_pw_option.xml class_pw_option_boolean.xml class_pw_option_integer.xml class_pw_option_multi_select.xml class_pw_option_select.xml class_pw_option_text.xml class_pw_optiongroup.xml class_pw_text.xml class_pw_text_da.xml class_pw_text_en.xml class_pw_text_hu.xml class_pw_text_no.xml class_pw_validator.xml class_pw_validator_ereg.xml class_pw_validator_range.xml classtree_base_object.xml classtree_property.xml classtree_pw_dependency.xml classtree_pw_option.xml classtree_pw_optiongroup.xml classtree_pw_validator.xml data_retrieval.html db_layer.html elementlist.xml empty.html frame_packagelist.html index.html packageelementlist_No_Package_specified.html packageelementlist_PHP_Weather.html packageelementlist_PHP_Weather_Configurator.html packagelist.xml phpdoc.css phpdoc.dtd phpdoc_classtree.html phpdoc_elementlist.html phpdoc_packagelist.html phpdoc_warnings.html phpdoc_xmlfiles.html phpweather.html property.html pw_db_common.html pw_db_dba.html pw_db_mysql.html pw_db_null.html pw_db_pgsql.html pw_dependency.html pw_dependency_or.html pw_images.html pw_option.html pw_option_boolean.html pw_option_integer.html pw_option_multi_select.html pw_option_select.html pw_option_text.html pw_optiongroup.html pw_text.html pw_text_da.html pw_text_en.html pw_text_hu.html pw_text_no.html pw_validator.html pw_validator_ereg.html pw_validator_range.html warnings_classanalyser.xml warnings_parser.xml Log Message: I'm removing the xml files produced by PHPDoc. The reason is, that PHPDoc doesn't seam to be supported any more. If someone wants the output, then he can still use PHPDoc (if he can get it to work...) --- base_object.html DELETED --- --- class_base_object.xml DELETED --- --- class_data_retrieval.xml DELETED --- --- class_db_layer.xml DELETED --- --- class_phpweather.xml DELETED --- --- class_property.xml DELETED --- --- class_pw_db_common.xml DELETED --- --- class_pw_db_dba.xml DELETED --- --- class_pw_db_mysql.xml DELETED --- --- class_pw_db_null.xml DELETED --- --- class_pw_db_pgsql.xml DELETED --- --- class_pw_dependency.xml DELETED --- --- class_pw_dependency_or.xml DELETED --- --- class_pw_images.xml DELETED --- --- class_pw_option.xml DELETED --- --- class_pw_option_boolean.xml DELETED --- --- class_pw_option_integer.xml DELETED --- --- class_pw_option_multi_select.xml DELETED --- --- class_pw_option_select.xml DELETED --- --- class_pw_option_text.xml DELETED --- --- class_pw_optiongroup.xml DELETED --- --- class_pw_text.xml DELETED --- --- class_pw_text_da.xml DELETED --- --- class_pw_text_en.xml DELETED --- --- class_pw_text_hu.xml DELETED --- --- class_pw_text_no.xml DELETED --- --- class_pw_validator.xml DELETED --- --- class_pw_validator_ereg.xml DELETED --- --- class_pw_validator_range.xml DELETED --- --- classtree_base_object.xml DELETED --- --- classtree_property.xml DELETED --- --- classtree_pw_dependency.xml DELETED --- --- classtree_pw_option.xml DELETED --- --- classtree_pw_optiongroup.xml DELETED --- --- classtree_pw_validator.xml DELETED --- --- data_retrieval.html DELETED --- --- db_layer.html DELETED --- --- elementlist.xml DELETED --- --- empty.html DELETED --- --- frame_packagelist.html DELETED --- --- index.html DELETED --- --- packageelementlist_No_Package_specified.html DELETED --- --- packageelementlist_PHP_Weather.html DELETED --- --- packageelementlist_PHP_Weather_Configurator.html DELETED --- --- packagelist.xml DELETED --- --- phpdoc.css DELETED --- --- phpdoc.dtd DELETED --- --- phpdoc_classtree.html DELETED --- --- phpdoc_elementlist.html DELETED --- --- phpdoc_packagelist.html DELETED --- --- phpdoc_warnings.html DELETED --- --- phpdoc_xmlfiles.html DELETED --- --- phpweather.html DELETED --- --- property.html DELETED --- --- pw_db_common.html DELETED --- --- pw_db_dba.html DELETED --- --- pw_db_mysql.html DELETED --- --- pw_db_null.html DELETED --- --- pw_db_pgsql.html DELETED --- --- pw_dependency.html DELETED --- --- pw_dependency_or.html DELETED --- --- pw_images.html DELETED --- --- pw_option.html DELETED --- --- pw_option_boolean.html DELETED --- --- pw_option_integer.html DELETED --- --- pw_option_multi_select.html DELETED --- --- pw_option_select.html DELETED --- --- pw_option_text.html DELETED --- --- pw_optiongroup.html DELETED --- --- pw_text.html DELETED --- --- pw_text_da.html DELETED --- --- pw_text_en.html DELETED --- --- pw_text_hu.html DELETED --- --- pw_text_no.html DELETED --- --- pw_validator.html DELETED --- --- pw_validator_ereg.html DELETED --- --- pw_validator_range.html DELETED --- --- warnings_classanalyser.xml DELETED --- --- warnings_parser.xml DELETED --- |
From: Martin G. <gim...@us...> - 2002-08-26 12:47:23
|
Update of /cvsroot/phpweather/phpweather/doc In directory usw-pr-cvs1:/tmp/cvs-serv32057 Added Files: phpweather.dvi phpweather.html phpweather.info phpweather.info-1 phpweather.info-2 phpweather.pdf phpweather.txt Log Message: Output from Texinfo sources. --- NEW FILE --- ÷À; ó3 ó3 ó3 ó5Installation¦fDetailsg~ ó3 <®Ý2©33GëX232CongurationT¥32ëY. 32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32. @ëX3¡6GÝ2.1 ó5The¦f`Þdefaults.phpÝ'leà ó5ChoMÞosing¦faDatabaseBac²!kendyå ó5Output¦fMoMÞdulesi? ó5Changing¦ftheOutput´ ÍÝ5¡6G3.2 ó5The¦fRa²!wData]k 2Ý5¦GëX432Tþ¦franslatingffPHPWeatherG·32ëY. 32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.32.3-ëX8ÿ6GÝ4.1 ó5Div²!erse¦fTÿeranslations ó5GNU¦fGeneralPublicLicense? ó5AppMÞendix:ÝÝHo²!w¦ftoApplyTheseTÿeermstoYourNew¡o÷±Programsh ó5GNU¦fFÿereeDoMÞcumen²!tationLicense= ó5ADDENDUM:¦fHo²!wtousethisLicenseforyour¡o÷±doMÞcumen²!ts^| ó3 ó3 Thereportw²!asmadeß33Ýminutesago,¤ ÝC¢å(ß59ü¾ºÝF).Theatmosphericpressurew²!asß1017ÝhPa¡.ù(ß30.03FfÝinHg).½ÞTherelativ²!ehumiditywasß93.8%Ý.½ÞTherewerenocloudsbMÞelow¡.ùß1524nÝmeter(ß5000Ýfeet)andnocum²!ulonimbusnclouds.ËTheo²!verallnvisibilitywas¡.ùgreater¦fthanß10Ýkilometers(ß6.2Ýmiles).¦!GEac²!hÌëstationisuniquelyidentiedbyit'sáICAO^~ÝcoMÞde.QkICAOÌáisanabbreviationforthe¤ 33GIn²!ternational¦fCivilAviationOrganization(Þhttp://www.icao.org/Ý).¦!GYÿeou¦fcancon²!troltheoutputinvÿdDariousways:¦Øæ'¿«ÝYÿeou¦~canc²!hangetheHTMLmarkupthatisinsertedbMÞeforeandaftereachvÿdDalueinthe¡'¿«repMÞort.7ßUsingÄg`Þ<b>Ý'and`Þ</b>Ý'giv²!esyoußbMÞoldlettersÝwhereas`Þ<font¦fcolor="navy">Ý'¡'¿«andºì`Þ</font>Ý'giv²!esyounavy-bluecoloredtext.pThechoiceisyours,ÀseeSection3.1.1¡'¿«[Changing¦ftheOutput],page5.¦Øæ'¿«ÝYÿeouüucanc²!hangethelanguageoftherepMÞort.¥8Thereportisbuiltb²!ycombiningmanytiny¡'¿«stringsugwhic²!hcanbMÞetranslatedintootherlanguages.JàThere'salsosuppMÞortformore¡'¿«div²!erse¦ftranslations,seeSection4.1[DiverseTÿeranslations],page8.33!GInstead¶|oftext,úy²!oucanalsohavePHP¶6Wÿeeatherselecticonsforyouthatmatchthe¡Gcurren²!t¦fweatherconditions.G_Ù avepMÞermissiontocreatenewlesinthe`Þdb/filesÝ'directoryunder¡Gthe¦fPHPWÿeeatherroMÞotdirectorybecausethew²!ebserver¦frunsasanunprivilegeduser.¦!GSo,L@y²!ou'll+havetochangethepMÞermissiononthe`Þdb/filesÝ'directoryÿe.kéI'llassumethat¡GtheÄCw²!ebserverisrunningsomeformofUnix.7sIfyouhaveshellaccesstothemachine,˺then¡Gy²!ouóÆcanexecutethefollowingcommandsafteryouhaveloggedintothewebserver.ÅýIfyou¡Gdon'tà,ha²!vethatkindofaccesstothemachine,îthenyoushouldstillbMÞeabletochangethe¡GpMÞermissions¦fusingy²!ourFTPprogram.ÝÝTherelevÿdDantcommandsare:ã.ùÞcd¿ª/root/directory/of/phpweather/installation¤ FmoMÞdule§MÝcalledÞpw_textÝ. }Theimagesareselectedb²!yanothermodulecalledÞpw_¡GimagesÝ.&!GThese¿moMÞdulesillustratetheideabehindPHP¿Wÿeeather:Othecodein`Þphpweather.phpÝ'¡Ghandles·ëtheparsingoftheMETÿeAR·¤andthensomeoneelsehastopresen²!tthedataina¡Gmeaningful¦fw²!ayÿe.ØGóaÂÖN lly°there'sÞmm_24hÝandÞin_24hÝwiththeprecipitationmeasuredo²!ver°thelast¡Kâ:24rWhours.ÌIftherehasbMÞeensno²!wfall,|ÁthenthatwillbereportedintheÞsnow_mm¡Kâ:Ýand¦fÞsnow_inÝen²!tries.33Kâ:All4xtheen²!triescancontainthespMÞecialvÿdDalue`Þ-1Ý'whichmeansthattherewas¡Kâ:only¦fatraceofprecipitation.¦GÞremarksMÝAn²!ything¦fwhichisn'trecognizedisaddedtothisentryÿe. !GIÍknewÍthatitw²!aspMÞossibletodosuchathing,×^asIÍhadseenacoupleofapplets(small¡Gprograms xthatserv²!esonlyonepurpMÞose,#}suchasdisplayingthetimeortheamountoffree¡Gspace*Eontheharddriv²!e,K<etc.)iythatcoulddisplaytheweather.iyI*#discoveredthattheygot¡Gtheir¦fdatafromtheNWSwhomak²!esthedataavÿdDailableatnocost.¦!GTheî>dataisa²!vÿdDailableotheInternetviaeitherFTPî+orHTTPÿe,soit'seasytogethold¡Gof[FitwithPHPÿe.Theonlyproblemw²!asthatthedatahastobMÞedecodedbecauseit'swritten¡Gin§Oacompactfashion.àThedatainquestionisaso-calledMETÿeARrepMÞortthattheairports¡Gissue¦fonceort²!wiceanhour.¦!GIhåthenhôdisco²!veredascriptwritteninPerlthatcouldtakeaMETÿeARhåandsplititintoit's¡GcompMÞonen²!ts.ÊThelescriptwaswrittenbyJeremyD.ZawoMÞdnyæhÞJe...@Za...æiÝandis¡Glicensed´undertheGPL¬justlik²!ePHPWÿeeather.Ó¢Sotherew²!asnoproblemwithmepMÞeeping¡GatähiscoMÞdeforPHPÝWÿeeather.ÕItookäthelogicfromtheP²!erlscriptandwroteafunctionin¡GPHP¦fthatw²!oulddecoMÞdeaMETÿeAR.¦!GButìhthatw²!ouldn'tdoit|tobMÞeusefulthedecodeddatahastobedispla²!yedìhinanice¡Gfashion,º preferable¶.sothatit'seasytocustomize. 5ThescriptshouldalsobMÞeabletofetc²!ha¡GMETÿeARèòfrométheNWSandoncethatisdone,ùªtheMETÿeARshouldbMÞecac²!hedsothatthe¡Gscriptþw²!ouldrunfasteraftertheMETÿeARâhadbMÞeenfetchedonce.)¥Theproblemis,0¤thatit¡Gtak²!es¦fabMÞoutasecondtocontacttheNWS.¦!GIYbw²!antedYtoseethedataIcouldextractfromtheMETÿeARinameaningfullw²!ayÿe,[soYI¡Gstartedå>wrappingthedatainEnglishw²!ordstoformsentenceslikein\ThetempMÞeratureis¡G20R2degreesCelsius(68degreesFÿeahrenheit)".áBThatturnedoutv²!erynicesoIRreleasedthe¡GcoMÞde¦ftothepublic.¦!GItdidn'ttÓthinkabMÞoutin²!ternationalizationthen,¨nbutafterawhile,Itreceiv²!edaSpanish¡Gtranslationtimadeb²!yEduardoGuileneaæhÞed...@gu...æiÝ.wÞBecausethescriptwasn't¡GreadyS¨forin²!ternationalization,d4hehadsimplygonethroughthescriptandtranslatedallthe¡GEnglish¦fw²!ordsintoSpanish.¦!GThatæÇprompMÞedmetostartthinkingaboutho²!wwecouldtranslatePHPæuWÿeeaterinto¡Gother½àlanguages.$KI½quic²!klyfoundout,¾thatitwouldworkifwekeptthestringsusedin¡GexternalB$lesinsteadofha²!vingtheminthemain`Þphpweather.incÝ'le.±Theuserscould¡Gthen¦fsimplyuseÞinclude(locale_da.inc)ÝtogetDanishoutput.¦!GAsÙùthingsstartedtogro²!w,&ÞitbMÞecameapparentthatPHPÙªWÿeeatherwouldhavetobMÞe¡Greorganized.FËIÉWw²!antedÉ`amore exiblestructure,Òastructurethatw²!ouldallowustoextend¡GPHP;ÁWÿeeather;èinthefuturewithoutha²!vingtomesswiththecoMÞdethatdoestheactually¡Gparsing·2oftheMETÿeARs.BWe·2alsohadtobMÞeabletosupportdatabasesinacleanerw²!ay·2|¡Gthe¦fcoMÞdein`Þphpweather.incÝ'hadturnedin²!toamess.¦!GSo¡ôI¡óstartedtosplittheleupin²!toseveralles,¢ØandalsostartedtouseclassesinPHPÿe.¡GThis¦fw²!asthersttimeIhadtodoanOb he¡GGNUFÿeree¶DoMÞcumen²!tationLicense.:ÎThislicenseissimilartotheGPL,it'sjustaimedfor¡GdoMÞcumen²!tation.©!GThis®meansthaty²!ouareallowedtousePHP®Wÿeeatheronasmanywebsitesasyoulike,¡Gand¦fy²!ou'reevenallowedtouseitoncommercialwebsites.³3GëXA.1GNUf@GeneralPublicLicense33 ,donot¡'¿«applyv¨tothosesectionswheny²!oudistributethemasseparateworks.N¢Butwhenyou¡'¿«distributethesamesectionsaspartofawholewhic²!hisaworkbasedontheProgram,¡'¿«theÀ.distributionofthewholem²!ustbMÞeonthetermsofthisLicense,Æ whosepermissions¡'¿«forotherlicenseesextendtotheen²!tirewhole,Þøandthustoeachandeverypartregardless¡'¿«of¦fwhowroteit.©× '¿«Th²!us,âitpisnottheintentofthissectiontoclaimrightsorcontestyourrightsto¡'¿«w²!ork Üwrittenentirelybyyou;;rather,"ºtheintentistoexercisetherighttocontrolthe¡'¿«distribution¦fofderivÿdDativ²!eorcollectiveworksbasedontheProgram.¦'¿«Inõzaddition,I?mereaggregationofanotherw²!orknotbasedontheProgramwiththe¡'¿«ProgramØ(orwithaw²!orkbasedontheProgram)onavolumeofastorageordistribution¡'¿«medium¦fdoMÞesnotbringtheotherw²!orkunderthescopeofthisLicense.¦-3.'¿«YÿeouvÑma²!ycopyanddistributetheProgram(oraworkbasedonit,ªëunderSection2)¡'¿«in¨ob ¢timeyouredistributetheProgram(oranyworkbasedontheProgram),c±the¡'¿«recipien²!tä automaticallyreceivesalicensefromtheoriginallicensortocopyÿe,ódistribute¡'¿«or^BmoMÞdifytheProgramsub tothewiderangeofsoft²!wareA distributedthroughthatsysteminrelianceon¡'¿«consisten²!tB9applicationofthatsystem;"itisuptotheauthor/donortodecideifheor¡'¿«she"iswillingtodistributesoft²!ware"throughan²!yothersystemandalicenseecannot¡'¿«impMÞose¦fthatc²!hoice.¦'¿«ThisBñsectionisin²!tendedtomakethoroughlyclearwhatisbMÞelievedtobMÞeaconsequence¡'¿«of¦ftherestofthisLicense.¦-8.'¿«If5©thedistributionand/oruseoftheProgramisrestrictedincertaincoun²!trieseither¡'¿«b²!y?´patentsorbycopyrightedinterfaces,ftheoriginalcopyrightholderwhoplacesthe¡'¿«Program[0underthisLicensema²!yaddanexplicitgeographicaldistributionlimitation¡'¿«excludingothosecoun²!tries,z&sothatdistributionispMÞermittedonlyinoramongcountries¡'¿«notî|th²!usexcluded.¶ Insuchcase, ³IftheProgramspeciesa¤ 33'¿«v²!ersionLnumbMÞerofthisLicensewhichappliestoitand\anylaterversion",v+youhave¡'¿«theð5optionoffollo²!wingthetermsandconditionseitherofthatversionorofanylater¡'¿«v²!ersionpublishedbytheFÿereeSoftwareFÿeoundation.Ú¿IftheProgramdoMÞesnotspecifya¡'¿«v²!ersionU@numbMÞerofthisLicense,e{youmaychoMÞoseanyversioneverpublishedbytheFÿeree¡'¿«Soft²!ware¦fFÿeoundation.©3310.'¿«Ify²!ouwishtoincorpMÞoratepartsoftheProgramintootherfreeprogramswhosedistri-¡'¿«butions,conditionsaredieren²!t,}kwritetotheauthortoaskforpMÞermission.ÌÊFÿeorsoftware¡'¿«whic²!hàÍiscopyrightedbytheFÿereeSoftwareFÿeoundation,RwritetotheFreeSoft²!wareàÍFoun-¡'¿«dation;jùw²!eMBsometimesmakeexceptionsforthis.À'OurdecisionwillbMÞeguidedbythetwo¡'¿«goals´ofpreservingthefreestatusofallderivÿdDativ²!esofourfreesoftwareandofpromoting¡'¿«the¦fsharingandreuseofsoft²!ware¦fgenerallyÿe. SUSTÿeAINEDBYYOUORTHIRDPARTIESORAFþÈAILUREOFTHE¡'¿«PR²!OGRAM¤TOOPERAÿeTEWITHANYOTHERPROGRAMS),¤HEVENIFSUCH¡'¿«HOLDER 5OROTHERPÿeARTY 5HASBEENAD²!VISEDOFTHEPOSSIBILITYOF¡'¿«SUCH¦fD²!AMAGES. osedofpixels)genericpain²!tprogramsor(fordrawings)somewidelyavÿdDail-¡'¿«ableÇHdra²!wingeditor,Ïandthatissuitableforinputtotextformattersorforautomatic¡'¿«translationÃ3toavÿdDariet²!yofformatssuitableforinputtotextformatters.4DAÃ,copymade¡'¿«in"anotherwiseTÿeransparen²!tleformatwhosemarkuphasbMÞeendesignedtothwartor¡'¿«discourageÊsubsequen²!tmoMÞdicationbyreadersisnotTÿeransparent.HöAÊcopythatisnot¡'¿«\Tÿeransparen²!t"¦fiscalled\Opaque".¦'¿«ExamplescXofsuitableformatsforTÿeransparen²!tcopiesincludeplainó8-ø ó3 eoriginalpublisherofthe¡=nv²!ersion¦fitreferstogivespMÞermission.¦*¤åK.=nIn`an²!ysectionentitled\Acknowledgments"or\Dedications",m]preservethesec-¡=ntion's%8title,Dìandpreserv²!einthesectionallthesubstanceandtoneofeachofthe¡=ncon²!tributor¦facknowledgmentsand/ordedicationsgiventherein.¦,Q*L.=nPreserv²!e?ÔalltheInvÿdDariantSectionsoftheDoMÞcument,f/unalteredintheirtextand¡=ninPÜtheirtitles.Ý@Sectionn²!umbMÞersPÜortheequivÿdDalen²!tarenotconsideredpartofthe¡=nsection¦ftitles.¦)M.=nDeleteãan²!ysectionentitled\Endorsements".SuchasectionmaynotbMÞeincluded¡=nin¦ftheMoMÞdiedVÿeersion.¦*òÄN.=nDonotretitlean²!yexistingsectionas\Endorsements"ortocon ictintitlewith¡=nan²!y¦fInvÿdDariantSection.'¿«IfØtheMoMÞdiedVÿeersionincludesnewfron²!t-mattersectionsorappendicesthatqualify¡'¿«asXSecondarySectionsandcon²!tainnomaterialcopiedfromtheDoMÞcument,gµyoumayat¡'¿«y²!ourãkoptiondesignatesomeorallofthesesectionsasinvÿdDariant.íTÿeodothis,òaddtheir¡'¿«titles@«tothelistofIn²!vÿdDariant@«SectionsintheMoMÞdiedVÿeersion'slicensenotice.¬¬These¡'¿«titles¦fm²!ustbMÞedistinctfromanyothersectiontitles.¦'¿«YÿeouREma²!yaddasectionentitled\Endorsements",½=provideditcontainsnothingbut¡'¿«endorsemen²!tsofyourMoMÞdiedVÿeersionbyvÿdDariousparties|forexample,Ystatementsof¡'¿«pMÞeerD revieworthatthetexthasbeenappro²!vedD byanorganizationastheauthoritative¡'¿«denition¦fofastandard.¦'¿«Yÿeouf,ma²!yaddapassageofuptovewordsasaFÿeront-CoverTÿeext,sandapassageofup¡'¿«to@25w²!ordsasaBack-CoverTÿeext,TìtotheendofthelistofCoverTÿeextsintheMoMÞdied¡'¿«Vÿeersion.Õ+OnlyN+onepassageofFron²!t-CoverN+TextandoneofBac²!k-CoverN+Textma²!ybMÞe¡'¿«addedNÁb²!y(orthrougharrangementsmadeby)anyoneentityÿe.À¦IftheDoMÞcumentalready¡'¿«includesÉaco²!verÉtextforthesameco²!ver,/!previouslyÉaddedb²!yyouorbyarrangement¡'¿«made:Çb²!ythesameentityyouareactingonbMÞehalfof,_ßyoumaynotaddanother;÷but¡'¿«y²!ou)mayreplacetheoldone,2onexplicitpMÞermissionfromthepreviouspublisherthat¡'¿«added¦ftheoldone.¦'¿«The^author(s)andpublisher(s)oftheDoMÞcumen²!tdonotbythisLicensegivepMÞermission¡'¿«to¤jusetheirnamesforpublicit²!yforortoassertorimplyendorsementofanyMoMÞdied¡'¿«Vÿeersion.¦-5.'¿«COMBINING¦fDOCUMENTS¦'¿«Yÿeou¦Çma²!ycombinetheDoMÞcumentwithotherdoMÞcumentsreleasedunderthisLicense,¡'¿«understhetermsdenedinsection4abMÞo²!vesformodiedv²!ersions,Ó¶providedsthaty²!ou¡'¿«include inthecom²!binationalloftheInvÿdDariantSectionsofalloftheoriginaldoMÞcuments,¡'¿«unmoMÞdied,L3and5¦listthemallasIn²!vÿdDariant5¦Sectionsofy²!ourcombinedworkinitslicense¡'¿«notice. ÿaFÿereeSoft²!wareÿaFoundationma²!ypublishnew,U revisedversionsoftheGNUÿ Fÿeree¤ 33'¿«DoMÞcumen²!tationÙâLicensefromtimetotime.xRSuchnewversionswillbMÞesimilarinspirit¡'¿«to æthepresen²!tversion,?butmaydierindetailtoaddressnewproblemsorconcerns.¡'¿«See¦fÞhttp://www.gnu.org/copyleft/Ý.33'¿«Eac²!h×versionoftheLicenseisgivenadistinguishingversionnumbMÞer.ÔIftheDocumen²!t¡'¿«spMÞeciesrthataparticularn²!umberedrversionofthisLicense\oranylaterversion"¡'¿«appliesæQtoit,öKy²!ouhavetheoptionoffollowingthetermsandconditionseitherofthat¡'¿«spMÞeciedv²!ersionorofanylaterversionthathasbMÞeenpublished(notasadraft)by¡'¿«theî!FÿereeSoft²!wareî!Foundation.µIftheDoMÞcumen²!tdoesnotspecifyav²!ersionnumbMÞerof¡'¿«this$License,D)y²!oumaychoMÞoseanyversioneverpublished(notasadraft)bytheFÿeree¡'¿«Soft²!ware¦fFÿeoundation. 9 ó3 ó3 ó3 ó3 ó3 ó3 ó3 --- NEW FILE --- This is phpweather.info, produced by makeinfo version 4.2 from src/phpweather.texi. Indirect: phpweather.info-1: 85 phpweather.info-2: 48506 Tag Table: (Indirect) Node: Top85 Node: Introduction1806 Ref: Introduction-Footnote-14559 Node: Installation4762 Node: Installation Details5212 Node: Configuration6143 Node: The defaults.php file6511 Node: Database Backends9921 Node: Using PHP Weather12735 Node: Output Modules13155 Node: Changing the Output13732 Node: The Raw Data13890 Node: Translating20548 Node: Diverse Translations20880 Node: Things To Do20995 Node: History22097 Node: Contributors25847 Node: Licenses28664 Node: GNU General Public License29271 Node: GNU Free Documentation License48506 Node: Concept Index68400 End Tag Table --- NEW FILE --- This is phpweather.info, produced by makeinfo version 4.2 from src/phpweather.texi. File: phpweather.info, Node: Top, Next: Introduction, Up: (dir) PHP Weather - a METAR Decoder ***************************** This is the definitive guide to PHP Weather, or at least it tries to be. PHP Weather is a script written in PHP (http://www.php.net/) which makes it possible to display the current weather on a webpage. The system is based on data from 4,500 airports scattered all over the world, so there's a good chance that you'll find a station near your place. * Menu: * Introduction:: What is PHP Weather? [...1056 lines suppressed...] commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. SIGNATURE OF TY COON, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. --- NEW FILE --- This is phpweather.info, produced by makeinfo version 4.2 from src/phpweather.texi. File: phpweather.info, Node: GNU Free Documentation License, Prev: GNU General Public License, Up: Licenses GNU Free Documentation License ============================== Version 1.1, March 2000 Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. In any section entitled "Acknowledgments" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgments and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgments", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents ---------------------------------------------------- To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. File: phpweather.info, Node: Concept Index, Prev: Licenses, Up: Top Concept Index ************* * Menu: * advanced translations: Diverse Translations. * Backend, databases: Database Backends. * Checking for new versions: Installation Details. * Choosing a database: Database Backends. * Configuration: Configuration. * data, raw: The Raw Data. * Database backends, differences: Database Backends. * defaults.php, building: The defaults.php file. * distributing PHP Weather: Licenses. * diverse translations: Diverse Translations. * Downloading PHP Weather: Installation Details. * FDL, GNU Free Documentation License: GNU Free Documentation License. * future: Things To Do. * GPL, GNU General Public License: GNU General Public License. * history: History. * Installation: Installation. * Introduction: Introduction. * licens: Licenses. * Localization: Translating. * modules, output: Output Modules. * Obtaining PHP Weather: Installation Details. * output modules: Output Modules. * Output, changing <1>: Changing the Output. * Output, changing: Output Modules. * PHP Weather, configuration: Configuration. * PHP Weather, history: History. * PHP Weather, how to install <1>: Installation Details. * PHP Weather, how to install: Installation. * raw data: The Raw Data. * TODO list: Things To Do. * Translating: Translating. * translating, advanced: Diverse Translations. * usage: Using PHP Weather. --- BINARY FILE --- --- NEW FILE --- PHP Weather - a METAR Decoder ***************************** This is the definitive guide to PHP Weather, or at least it tries to be. PHP Weather is a script written in PHP (http://www.php.net/) which makes it possible to display the current weather on a webpage. The system is based on data from 4,500 airports scattered all over the world, so there's a good chance that you'll find a station near your place. Table of Contents ***************** PHP Weather - a METAR Decoder Introduction Installation [...1419 lines suppressed...] Output, changing: See ``Output Modules''. PHP Weather, configuration: See ``Configuration''. PHP Weather, history: See ``History''. PHP Weather, how to install <1>: See ``Installation Details''. PHP Weather, how to install: See ``Installation''. raw data: See ``The Raw Data''. TODO list: See ``Things To Do''. Translating: See ``Translating PHP Weather''. translating, advanced: See ``Diverse Translations''. usage: See ``Using PHP Weather''. |
From: Martin G. <gim...@us...> - 2002-08-26 12:47:00
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory usw-pr-cvs1:/tmp/cvs-serv31931 Added Files: phpweather.texi texinfo.tex Log Message: Texinfo sources. --- NEW FILE --- \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename phpweather.info @settitle PHP Weather User and Reference Guide @c @setchapternewpage odd @c %**end of header @set VERSION 2.x-CVS @set RELEASED 2002-08-26 @titlepage @title PHP Weather Version @value{VERSION} @subtitle Reference and Users Guide released on @value{RELEASED} @author Martin Geisler @email{gimpster@@phpweather.net} @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll [...1628 lines suppressed...] ``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: @node Concept Index @appendix Concept Index @printindex cp @bye --- NEW FILE --- % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2002-03-01.06} % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, % 2000, 01, 02 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation; either version 2, or (at % your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. [...6304 lines suppressed...] % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Set initial fonts. @textfonts @rm @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: |
From: Martin G. <gim...@us...> - 2002-08-26 12:46:28
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory usw-pr-cvs1:/tmp/cvs-serv31754/src Log Message: Directory /cvsroot/phpweather/phpweather/doc/src added to the repository |
From: Martin G. <gim...@us...> - 2002-08-12 23:59:20
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv20828 Modified Files: phpweather.inc Log Message: Support for humidex thanks to Robin Senior <8r...@ql...>. See this page for an explaination of humidex: http://www.theweathernetwork.com/help/glossary/humidex.htm Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- phpweather.inc 11 Aug 2002 11:38:58 -0000 1.10 +++ phpweather.inc 12 Aug 2002 23:59:16 -0000 1.11 @@ -952,6 +952,17 @@ (1779.75 * ($decoded_metar['dew_c'] - $decoded_metar['temp_c'])/ ((237.3 + $decoded_metar['dew_c']) * (237.3 + $decoded_metar['temp_c'])) + 2)), 1); + + /* + * Humidity index + */ + $e = 6.112 * pow(10, 7.5 * $decoded_metar['temp_c'] + / (237.7 + $decoded_metar['temp_c'])) + * $decoded_metar['rel_humidity']/100; + $decoded_metar['humidex_c'] = + number_format($decoded_metar['temp_c'] + 5/9 * ($e - 10),1); + $decoded_metar['humidex_f'] = + number_format($decoded_metar['humidex_c'] * 9/5 + 32, 1); /* * Windchill. |
From: Martin G. <gim...@us...> - 2002-08-12 23:52:06
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv19064 Modified Files: phpweather.php Log Message: Support for humidex thanks to Robin Senior <8r...@ql...>. See this page for an explaination of humidex: http://www.theweathernetwork.com/help/glossary/humidex.htm Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- phpweather.php 29 Jun 2002 10:51:08 -0000 1.28 +++ phpweather.php 12 Aug 2002 23:52:03 -0000 1.29 @@ -685,6 +685,20 @@ $decoded_metar['heatindex']['heatindex_c'] = number_format(($decoded_metar['heatindex']['heatindex_f'] - 32) / 1.8); } + + /* + * Compute the humidity index + */ + if (!empty($decoded_metar['rel_humidity'])) { + $e = (6.112 * pow(10, 7.5 * $decoded_metar['temperature']['temp_c'] + / (237.7 + $decoded_metar['temperature']['temp_c'])) + * $decoded_metar['rel_humidity'] / 100) - 10; + $decoded_metar['humidex']['humidex_c'] = + number_format($decoded_metar['temperature']['temp_c'] + 5/9 * $e, 1); + $decoded_metar['humidex']['humidex_f'] = + number_format($decoded_metar['humidex']['humidex_c'] * 9/5 + 32, 1); + } + /* Finally we store our decoded METAR in $this->decoded_metar so * that other methods can use it. |