phpweather-devel Mailing List for PHP Weather (Page 14)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(52) |
Mar
(79) |
Apr
(9) |
May
(28) |
Jun
(17) |
Jul
(25) |
Aug
(48) |
Sep
(18) |
Oct
(6) |
Nov
|
Dec
(8) |
2003 |
Jan
(26) |
Feb
(10) |
Mar
(2) |
Apr
(21) |
May
(23) |
Jun
(15) |
Jul
(15) |
Aug
(8) |
Sep
(16) |
Oct
(3) |
Nov
(4) |
Dec
|
2004 |
Jan
(35) |
Feb
(35) |
Mar
(9) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
(6) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Martin G. <gim...@gi...> - 2002-08-26 17:09:27
|
Hi everybody As those of you who follow the phpweather-checkins mailing list will know, I've been adding and deleting files from CVS today. I've also made a number of small corrections. My plan is to finally make a release of the code in CVS. I've been using it on Gimpster.com for some months now without problems. I'm very happy with most of the code, although I've discovered that the text output can be improved. The 'problem' is that many of the strings are put together like this: $output = $strings['foo'] . $var_a . $strings['bar'] . $var_b . $strings['baz'] . $var_c; instead of this $output = sprintf($strings['foobarbaz'], $var_a, $var_b, $var_c); The advantage of the last method is, that the translator can make $var_c come before $var_a in the final string. Changing this requires updates of the translations, but it shouldn't be that hard to do since it's mostly a matter of moving and combining existing strings. There's also currently three open bug reports, but they're not too serious. And if we wait until all bugs are fixed, then we'll never be able to release anything. So, please update from CVS and see if you can spot any problems. Mail back tomorrow with your comments. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Greg L. <web...@wv...> - 2002-08-26 14:45:29
|
On 8/26/2002 at 12:48 PM Martin Geisler wrote: >Martin Geisler <gim...@gi...> writes: > >> You have to create the databases as described in index.php before >> you can use a MySQL database. > >Argh! I meant to say demo.php - sorry... (It's darn confusing when the >filenames have changed between the versions... the code in CVS uses >index.php as the entry-point.) > Martin, I did set up the database but your message caused me to double check everything closer. I found that I had specified the table name rather than the database name in the config file. It's working now. Thanks, Greg |
From: Martin G. <gim...@gi...> - 2002-08-26 10:48:58
|
Martin Geisler <gim...@gi...> writes: > You have to create the databases as described in index.php before > you can use a MySQL database. Argh! I meant to say demo.php - sorry... (It's darn confusing when the filenames have changed between the versions... the code in CVS uses index.php as the entry-point.) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-08-26 10:45:36
|
"Greg LaBrec" <wv...@wv...> writes: > Has anyone been able to get caching to work? Are there any tips that > might help? I am particularly confused by the references to naming > the configuration file. There are separate references that say it > should be called one of the following: config.inc, config.php, or > defaults.inc. Is that where I'm going wrong? Maybe, but I can understand that you're confused with all those different filenames. They belong to different versions of PHP Weather. The errors below talk about phpweather.inc and that tells me that you're using version 1.6x or something like that, i.e. one of the versions you can download at SourceForge. To configure your version, you'll start with the file config-dist.inc. If you don't have this file, then please download the latest version (1.61) from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=23245 Copy the file config-dist.inc to config.inc and then change the options in config.inc. Delete the lines from config.inc that you don't change. The idea is that config-dist.inc is distributed with each new release of PHP Weather whereas your private config.inc isn't. The config-dist.inc file is read first, and then config.inc is read so that your changes can override the options in config-dist.inc. > The only thing I seem to be able to get any results out of is > changing the flags in the config-dist.inc file. Yes, that works. But the next time you upgrade config-dist.inc will be overwritten by the default one - if you copy it to config.inc it will survive the upgrade. > Here are the messages I get: > > MySQL----- > Warning: mysql_num_rows(): supplied argument is not a valid MySQL result > resource in /home/wvfc/wvfc-www/wxphp/phpweather.inc on line 391 You have to create the databases as described in index.php before you can use a MySQL database. > DBM database----- > Fatal error: Call to undefined function: dbmopen() in > /home/wvfc/wvfc-www/wxphp/phpweather.inc on line 34 Your version of PHP doesn't have support for dbm database. > XML----- > XML file does not exist or we couldn't open it for read/write! Hmm? I'm not sure about that one... -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Greg L. <wv...@wv...> - 2002-08-25 02:11:04
|
Has anyone been able to get caching to work? Are there any tips that might help? I am particularly confused by the references to naming the configuration file. There are separate references that say it should be called one of the following: config.inc, config.php, or defaults.inc. Is that where I'm going wrong? The only thing I seem to be able to get any results out of is changing the flags in the config-dist.inc file. Here are the messages I get: MySQL----- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wvfc/wvfc-www/wxphp/phpweather.inc on line 391 DBM database----- Fatal error: Call to undefined function: dbmopen() in /home/wvfc/wvfc-www/wxphp/phpweather.inc on line 34 XML----- XML file does not exist or we couldn't open it for read/write! I have tried chmod 666 and 777 in different combinations on the wxphp directory and the cache.xml file. If anyone has any ideas I would appreciate it. Thanks In Advance, Greg |
From: Martin G. <gim...@gi...> - 2002-08-23 18:08:21
|
"Ray Saldana III" <ab...@co...> writes: > In running the demo file on the new control panel, I get this > curious error messages, but=A0 still get the weather reports, any > ideas? On the second one, I did not include the Spanish include > file. It is almost like a closing is missing, the same files work > perfectly on the Apache server I have installed on my personal > machine. The problem is that the PHP guys have changed the way the pow() function works: it used to accept something like this $v =3D pow('1.5', 2); but it will nolonger convert the string into a float. Use (float) infront of the arguments in the lines that cause trouble should help with this: $v =3D pow((float)'1.5', 2); --=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather =3D> Shows the current weather on your webpage and PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: <no...@so...> - 2002-08-23 17:10:37
|
Feature Requests item #599335, was opened at 2002-08-23 17:10 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=599335&group_id=23245 Category: Output Group: None Status: Open Resolution: None Priority: 5 Submitted By: Koen Lenaers (klennie) Assigned to: Nobody/Anonymous (nobody) Summary: Windspeed in beaufort Initial Comment: Hi! I use phpWeather on the website of a windsurfing club (http://www.sirocco.tk in dutch however) and I like it a lot! However it would be realy nice to have the windspeed expressed in beaufort too since a lot of the surfers use this scale to measure the wind speed. I could modifie the code for myself, but that serves nobody else. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=599335&group_id=23245 |
From: <no...@so...> - 2002-08-20 12:20:19
|
Feature Requests item #597732, was opened at 2002-08-21 00:20 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=597732&group_id=23245 Category: Output Group: None Status: Open Resolution: None Priority: 5 Submitted By: Geoff Lankow (darktrojan) Assigned to: Nobody/Anonymous (nobody) Summary: Sun / Moon picture Initial Comment: Output the sun or the moon pictures based on the local time of the metar - not the server time, also be able to display times as local times in the text output. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=597732&group_id=23245 |
From: Ray S. I. <ab...@co...> - 2002-08-14 23:48:18
|
In running the demo file on the new control panel, I get this curious = error messages, but still get the weather reports, any ideas? On the = second one, I did not include the Spanish include file. It is almost = like a closing is missing, the same files work perfectly on the Apache = server I have installed on my personal machine. A sample METAR-report The report below is the latest from Aalborg, Denmark (this is where I = live). The raw METAR looks this way: EKYT 142150Z 27008KT 9999 FEW018 17/15 Q1017 NOSIG Not exactly a pretty sight? Well by using PHP Weather you could also present the information like this: Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 849 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 850 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 851 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 852 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 858 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 859 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 860 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 861 110 minutes ago, at 21:50 UTC, the wind was blowing at a speed of 4.1 = meters per second (9.2 miles per hour) from West in Aalborg, Denmark. = The temperature was 17 degrees Celsius (63 degrees Fahrenheit), and the pressure was = 1,017 hPa (30.03 inHg). The relative humidity was 93.5%. There were a = few clouds at a height of 549 meter (1800 feet). The visibility was >11.3 kilometers = (>7 miles). Here is the same piece of text with the current weather in Honolulu, = Hawaii. This time the information is presented in Spanish. First comes = the raw METAR: PHNL 142153Z 00000KT 10SM FEW019 27/24 A2997 RMK AO2 RAE49 SLP149 P0001 = T02670244 and then the pretty-printed output: Warning: Failed opening 'locale_es.inc' for inclusion = (include_path=3D'') in /home/rrnet/public_html/demo.php3 on line 100 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 849 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 850 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 851 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 852 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 858 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 859 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 860 Warning: Invalid argument(s) passed to pow() in = /home/rrnet/public_html/phpweather.inc on line 861 107 minutes ago, at 21:53 UTC, the wind was calm in Honolulu, Hawaii. = The temperature was 27 degrees Celsius (81 degrees Fahrenheit), and the = pressure was 1,015 hPa (29.97 inHg). The relative humidity was 92.6%. There were a = few clouds at a height of 579 meter (1900 feet). The visibility was 16.1 = kilometers (10.0 miles). =20 Ray Saldana III RRIS http://www.rottenray.net http://www.rottenray.com |
From: Martin G. <gim...@gi...> - 2002-08-13 09:31:02
|
"Jake Ortman" <ja...@or...> writes: >>Yes, change the test so that it's correct for your timezone. Use >> >> if (($regs[2] > 1) && ($regs[2] < 13)) { >> $night = 1; >> } > > That didn't work. It's 11:30 am pacific time right now, and there's > a moon graphic on the site :-). Hmm, that's odd. Let me try and explain how I came up with '> 1' and '< 13'. The Pacific Time Zone is UTC - 7 hours because of Daylight Saving Time, correct me if I'm wrong, I've got my information from this page: http://www.timetemperature.com/tzus/oregon_time_zone.shtml So a timeline would look like this: PDT: 00 ~~~~~~ 06 ------ 12 ------ 18 ~~~~~~ 24 where the ~ marks the hours that belong to the night. The corresponding UTC timezone is: UTC: 07 ~~~~~~ 13 ------ 19 ------ 01 ~~~~~~ 07 So, this means that it's night at your place when the hour is between 7 and 13 UTC or 1 and 7 UTC, i.e., from 1 to 13 UTC. So unless someone can find an error in the above calculations, then I cannot understand why it doesn't work for you... -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: <no...@so...> - 2002-08-12 23:20:02
|
Feature Requests item #594304, was opened at 2002-08-13 01:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=594304&group_id=23245 Category: Databases Group: CVS (bleeding edge) Status: Open Resolution: None Priority: 5 Submitted By: Martin Geisler (gimpster) Assigned to: Nobody/Anonymous (nobody) Summary: ICAO <=> US Zip code mapping Initial Comment: Helge Weissig compiled this file ages ago, but it never got used in PHP Weather :-/ This is the mail he sent to the PHP Weather development list little over a year ago: Hi, I thought it would be nice to add some "weather by zip code functionality to phpweather. I realize that this is completely US centric and does not appeal to veryone. However, I did the work anyways and put together two tables that contain a mapping between ICAO stations and US Zip codes and vice versa. The mapping was done by locating the closest weather station for each geographic center of each zip code and conversely by locating the closest zip code geographic center for each station. There are some problems with the direct query by zip code as not all stations are reliable enough. This could be circumvented by querying for the closest stations and retrieving weather information for the first one with information available. Send me e-mail if you have any questions. I am not subscribed to this list, so make sure to address the e-mail directly to me. cheers, h. ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2002-08-13 01:20 Message: Logged In: YES user_id=104098 Hmm... I couldn't upload a 544Kb file here, so I've placed it at the PHP Weather homepage instead: http://phpweather.net/downloads/zipcodes.sql.gz It will be removed when it is integrated into PHP Weather and put in CVS so check there if you cannot find the file using the above link. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=594304&group_id=23245 |
From: <no...@so...> - 2002-08-12 23:07:20
|
Feature Requests item #594304, was opened at 2002-08-13 01:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=594304&group_id=23245 Category: Databases Group: CVS (bleeding edge) Status: Open Resolution: None Priority: 5 Submitted By: Martin Geisler (gimpster) Assigned to: Nobody/Anonymous (nobody) Summary: ICAO <=> US Zip code mapping Initial Comment: Helge Weissig compiled this file ages ago, but it never got used in PHP Weather :-/ This is the mail he sent to the PHP Weather development list little over a year ago: Hi, I thought it would be nice to add some "weather by zip code functionality to phpweather. I realize that this is completely US centric and does not appeal to veryone. However, I did the work anyways and put together two tables that contain a mapping between ICAO stations and US Zip codes and vice versa. The mapping was done by locating the closest weather station for each geographic center of each zip code and conversely by locating the closest zip code geographic center for each station. There are some problems with the direct query by zip code as not all stations are reliable enough. This could be circumvented by querying for the closest stations and retrieving weather information for the first one with information available. Send me e-mail if you have any questions. I am not subscribed to this list, so make sure to address the e-mail directly to me. cheers, h. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=594304&group_id=23245 |
From: Jake O. <ja...@or...> - 2002-08-08 18:33:14
|
>Yes, change the test so that it's correct for your timezone. Use > > if (($regs[2] > 1) && ($regs[2] < 13)) { > $night = 1; > } That didn't work. It's 11:30 am pacific time right now, and there's a moon graphic on the site :-). -Jake |
From: Martin G. <gim...@gi...> - 2002-08-08 10:34:24
|
"Jake Ortman" <ja...@or...> writes: > This is probably a fairly stupid question that hopefully has a simple fix. With PHP Weather there's no such thing as a stupid question - new problems surface regularly... :-) > I'm running a version of 2.0 on my site (I think it's a pre-2.0 > final CVS release, so if it's been fixed in the final release, let > me know). There has not been a release of the 2.0 code yet, although it's the code that I'm using at gimpster.com and at phpweather.net... > It provides the simple current weather for the area for our rental > guests (http://www.sunrayinc.com/sunriver/weather/) using a modified > print_table function. However, as you'll see right now, it's showing > a nighttime part-cloud graphic, even though it's only 4:30 here > right now. I tried setting the time offset before, and it didn't > work (or maybe I didn't set it right?). No, it's not your fault - it's a problem in pw_images.php at line 266: } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { if (($regs[2] < 6) || ($regs[2] > 18)) { $night = 1; } The regular expression matches the date-part of the METAR and the if-statement in the next line tries to figure out if it's night or day... The problem is, that this is calculated using UTC time: a report made at 16:30 PDT in Oregon (the afternoon) is made at 23:30 UTC which is night-time according to the if-statement above. > Any body have any ideas? Yes, change the test so that it's correct for your timezone. Use if (($regs[2] > 1) && ($regs[2] < 13)) { $night = 1; } instead - that should be correct for the Pacific Time Zone. This could probably be automated using date('Z')... -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-08-08 09:56:47
|
"Yavor Shahpasov" <ya...@ni...> writes: > Hello, > > I ended up writing my own class and i "borrowed" the parsing part > from php weather. I want to submit the class to PEAR (pear.php.net) > and i just need to know if the author of php weather is OK with that > . He'll get apropriate credit and even can maintain the class if he > feels so, I'll love to see a METAR parsing class in PEAR - even more so, if it's based on code from PHP Weather :-) I don't know if I'm the right person to maintain it, as I've never used a class from PEAR before. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Michael <din...@ea...> - 2002-08-07 21:45:22
|
Jake asked me to pass this along to the group.=20 Michael From: Jake Ortman=20 To: Michael=20 Sent: Wednesday, August 07, 2002 9:49 AM Subject: RE: phpweather-CVS-latest On that page (http://www.sunrayinc.com/sunriver/weather/), I have this = in the main content table area: <?php require('phpweather.php'); require('pw_utilities.php'); $weather =3D new phpweather(array()); $language =3D "en"; require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $type =3D 'pw_text_' . $language; $text =3D new $type($weather, array()); echo $text->print_table() . "<br />\n"; ?> My print_table function looks like so: function print_table() { // We use our own weather-object. $data =3D $this->weather->decode_metar(); $location =3D $data['location']; $date =3D $this->print_pretty_time($data['time']); $wind =3D $this->print_pretty_wind($data['wind']); $temperature =3D = $this->print_pretty_temperature($data['temperature']); $pressure =3D $this->print_pretty_altimeter($data['altimeter']); $humidity =3D = $this->print_pretty_rel_humidity($data['rel_humidity']); =20 $sky =3D $this->print_pretty_clouds($data['clouds']); $icons =3D new pw_images($weather, array()); =20 if ($this->properties['orientation'] =3D=3D 'vertical') { } else { echo '<table align=3D"center" width=3D"100%" cellspacing=3D"0" = cellpadding=3D"2" border=3D"0">'; echo '<tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./skyimage.php?icao=3Dkrdm">'; echo '</td>'; echo "<td width=3D\"60%\" align=3D\"center\">$sky $temperature</td>"; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./tempimage.php?icao=3Dkrdm">'; echo '</td></tr><tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./windimage.php?icao=3Dkrdm">'; echo '</td>'; echo " <td colspan=3D\"2\" width=3D\"80%\">$wind</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$humidity</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$pressure</td> </tr> </table> "; } One thing I forgot to mention is that I created duplicates of the = "currentimage.php" file, editing them for the temp image, sky image, and = wind image, and called them in my print_table function. That's the only = way I could get the images to work right (I'm not a whiz PHP guy, I just = tried it and it worked). If you'd like, feel free to send that to the list. I don't have the = list's e-mail address with me (I'm not on my usual computer). If you = have a solution re: the night time icons, let me know! -Jake -----Original Message----- From: Michael [mailto:psa...@ea...] Sent: Tuesday, August 06, 2002 6:05 PM To: web...@su... Subject: phpweather-CVS-latest I still dont quite understand this,=20 How did you get your page to show that information? Is there code you can send me to help me? Thanks. Michael |
From: Michael <psa...@ea...> - 2002-08-07 21:09:53
|
From: Jake Ortman=20 To: Michael=20 Sent: Wednesday, August 07, 2002 9:49 AM Subject: RE: phpweather-CVS-latest On that page (http://www.sunrayinc.com/sunriver/weather/), I have this = in the main content table area: <?php require('phpweather.php'); require('pw_utilities.php'); $weather =3D new phpweather(array()); $language =3D "en"; require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $type =3D 'pw_text_' . $language; $text =3D new $type($weather, array()); echo $text->print_table() . "<br />\n"; ?> My print_table function looks like so: function print_table() { // We use our own weather-object. $data =3D $this->weather->decode_metar(); $location =3D $data['location']; $date =3D $this->print_pretty_time($data['time']); $wind =3D $this->print_pretty_wind($data['wind']); $temperature =3D = $this->print_pretty_temperature($data['temperature']); $pressure =3D $this->print_pretty_altimeter($data['altimeter']); $humidity =3D = $this->print_pretty_rel_humidity($data['rel_humidity']); =20 $sky =3D $this->print_pretty_clouds($data['clouds']); $icons =3D new pw_images($weather, array()); =20 if ($this->properties['orientation'] =3D=3D 'vertical') { } else { echo '<table align=3D"center" width=3D"100%" cellspacing=3D"0" = cellpadding=3D"2" border=3D"0">'; echo '<tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./skyimage.php?icao=3Dkrdm">'; echo '</td>'; echo "<td width=3D\"60%\" align=3D\"center\">$sky $temperature</td>"; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./tempimage.php?icao=3Dkrdm">'; echo '</td></tr><tr>'; echo '<td width=3D"20%" align=3D"center">'; echo '<img src=3D"./windimage.php?icao=3Dkrdm">'; echo '</td>'; echo " <td colspan=3D\"2\" width=3D\"80%\">$wind</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$humidity</td> </tr> <tr> <td width=3D\"20%\" align=3D\"center\"> </td> <td colspan=3D\"2\" width=3D\"80%\">$pressure</td> </tr> </table> "; } One thing I forgot to mention is that I created duplicates of the = "currentimage.php" file, editing them for the temp image, sky image, and = wind image, and called them in my print_table function. That's the only = way I could get the images to work right (I'm not a whiz PHP guy, I just = tried it and it worked). If you'd like, feel free to send that to the list. I don't have the = list's e-mail address with me (I'm not on my usual computer). If you = have a solution re: the night time icons, let me know! -Jake -----Original Message----- From: Michael [mailto:psa...@ea...] Sent: Tuesday, August 06, 2002 6:05 PM To: web...@su... Subject: phpweather-CVS-latest I still dont quite understand this,=20 How did you get your page to show that information? Is there code you can send me to help me? Thanks. Michael |
From: Martin G. <gim...@gi...> - 2002-08-07 14:41:44
|
"Michael" <din...@ea...> writes: > I have installed phpweather-CVS-latest, read the docs, and for one i > dont see a demo.php file, Ups - the docs are outdated... > i have however configured all my settings and setup my sql DB. Now > if i want to show the latest METAR for lets say KLAX on a page i > build, what is the code to call for that? This should give you the report: <?php require('phpweather.php'); require('output/pw_text_en.php'); require('output/pw_images.php'); $weather = new phpweather(array('icao' => 'KLAX')); $text = new pw_text_en($weather); $icons = new pw_images($weather); echo $text->print_pretty() . "<br />\n"; echo '<img src="'.$icons->get_sky_image().'" />'; echo '<img src="'.$icons->get_winddir_image().'" />'; echo '<img src="'.$icons->get_temp_image().'" />'; ?> -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Yavor S. <ya...@ni...> - 2002-08-07 11:01:27
|
Hello, I needed the metar parsing functionality and while php weather has a lot of features, i found it a bit overkill for the application I was writing. I just needed the parsing functionality. I ended up writing my own class and i "borrowed" the parsing part from php weather. I want to submit the class to PEAR (pear.php.net) and i just need to know if the author of php weather is OK with that . He'll get apropriate credit and even can maintain the class if he feels so, Yavor Shahpasov |
From: Jake O. <ja...@or...> - 2002-08-06 23:36:12
|
This is probably a fairly stupid question that hopefully has a simple fix. I'm running a version of 2.0 on my site (I think it's a pre-2.0 final CVS release, so if it's been fixed in the final release, let me know). It provides the simple current weather for the area for our rental guests (http://www.sunrayinc.com/sunriver/weather/) using a modified print_table function. However, as you'll see right now, it's showing a nighttime part-cloud graphic, even though it's only 4:30 here right now. I tried setting the time offset before, and it didn't work (or maybe I didn't set it right?). Any body have any ideas? -jake |
From: Michael <din...@ea...> - 2002-08-06 23:22:45
|
I have installed phpweather-CVS-latest, read the docs, and for one i = dont see a demo.php file, i have however configured all my settings and = setup my sql DB. Now if i want to show the latest METAR for lets say = KLAX on a page i build, what is the code to call for that? Any help is appreciated Michael |
From: Martin G. <gim...@gi...> - 2002-08-06 16:10:06
|
Gyulai Miha'ly <gy...@fb...> writes: > Fabio Parri =EDrta, 2002-07-29, 18:24-kor kelt level=E9ben, ami 74 sorb= =F3l =E1llt: >=20 >> Does any of you guys know this site ? >>=20 >> http://www.coyotemediaproductions.com/metar/main.asp >=20 > I checked the site, but didn't download the script. >=20 > According their 'Features' list, it cannot do more than phpweather. >=20 > Although the TAF decode is a plus, however TAF gives only a general > description of the coming weather and wind speed, so I'm not sure > TAF deserves the trouble to implement it... But it's still something that a lot of people want to have on their websites... =20 > Description talks about 6000 ICAO stations (at one place), but at > another place about 3200 stations... I don't know which one is > correct... >=20 > How many ICAO stations does phpweather know? A lot :-) There's ~5100 stations in the stations.csv file but only ~4500 stations are active. The stations.csv file went from ~3000 stations to ~5100 stations after Tom Corser sent me his list of stations. See the thread 'New weather site' at GeoCrawler: http://makeashorterlink.com/?F2BE11371 We'll have to find the ~500 stations that doesn't belong to our list, but the list itself should also be updated: http://makeashorterlink.com/?W4FE15371 --=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather =3D> Shows the current weather on your webpage and PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: <no...@so...> - 2002-08-06 10:24:40
|
Feature Requests item #586044, was opened at 2002-07-24 19:22 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=586044&group_id=23245 Category: None Group: None >Status: Open Resolution: None Priority: 5 Submitted By: hort (hortensio) Assigned to: Nobody/Anonymous (nobody) >Summary: More precise date/time output Initial Comment: In LPFU at 10:30 UTC shows "-8238 minutes ago, at 10:30 UTC, the wind was blowing at a speed of 7.7 ".... the problem is of course the - sign that shows (variable $minutes_old). ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2002-08-06 12:24 Message: Logged In: YES user_id=104098 I agree that something should be done about negative dates - the best thing would be, if we had a system that would automatically use the right precission, so that a recent report gets a string like '25 minutes ago, at XX:XX UTC' and an older report gets '3 days ago, at XX:YY UTC on August the 3th'. We could even make it so, that one can choose to have a relative date (the 'x units ago') and an absolute date (the 'at XX:YY UTC on ...') or both. I think that would be rather cool. ---------------------------------------------------------------------- Comment By: hort (hortensio) Date: 2002-07-24 20:28 Message: Logged In: YES user_id=583650 Never mind! The LPFU file is from the year 2000 2000/11/30 10:30 LPFU 301030Z 21015G25KT 9999 SCT018 BKN250 21/15 Q1015 RS2505KT 052010KT 232218KT sorry! You could create a control then this happens like if older then 5 days then data to old to be used..... just a thought ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=586044&group_id=23245 |
From: Gyulai Miha'ly <gy...@fb...> - 2002-07-29 18:01:51
|
Fabio Parri =EDrta, 2002-07-29, 18:24-kor kelt level=E9ben, ami 74 so= rb=F3l =E1llt: > Does any of you guys know this site ? >=20 > http://www.coyotemediaproductions.com/metar/main.asp >=20 > It's a perl commercial product very similiar to phpweather. I guess > someone could check it and see wether it offers some interesting > feature we could implement in phpweather as well :) > I think it supports TAF I checked the site, but didn't download the script. According their 'Features' list, it cannot do more than phpweather. Although the TAF decode is a plus, however TAF gives only a general description of the coming weather and wind speed, so I'm not sure TAF deserves the trouble to implement it... Description talks about 6000 ICAO stations (at one place), but at another place about 3200 stations... I don't know which one is correct... How many ICAO stations does phpweather know? --=20 Mih=E1ly Gyulai http://gyulai.freeyellow.com/ |
From: Fabio P. <pa...@ut...> - 2002-07-29 16:22:53
|
Hi guys, This is my first post on this mailing list. Does any of you guys know this site ? http://www.coyotemediaproductions.com/metar/main.asp It's a perl commercial product very similiar to phpweather. I guess = someone could check it and see wether it offers some interesting feature = we could implement in phpweather as well :) I think it supports TAF Ciao Fabio |