phpweather-devel Mailing List for PHP Weather (Page 15)
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-07-17 18:01:18
|
"Martin Sweeney" <sw...@ro...> writes: > Hi again; > > where in v 1.61 can i find listings of the various data field names > (eg temp_c for temerature in *c) ? Try using print_r() on the result of a call to process_metar(): echo "<pre>\n"; print_r(process_metar(get_metar('EKAH'))); echo "</pre>\n"; You can also look for '$decoded_metar[' in phpweather.inc. -- 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-07-17 16:41:00
|
"Martin Sweeney" <sw...@ro...> writes: > Hi all; Hi Martin, > Ive just started using Phpweather v 1.61. > > I have seen created a page called weather.php, and the following code is the > source; > > The error that comes up on the published page lists as so; > > <img src=" > Fatal error: Call to undefined function: get_temp_image() in > /usr/local/psa/home/vhosts/rokits.org/web_users/martin/weather.php on line 20 The problem is, that you haven't included the file images.inc file. The function get_temp_image() is defined there. I'm sorry that the documentation doesn't mention this - I'll fix it right away. > And, since there is no config setup on this new version, how do i > alter the time offset? There's some instructions in a comment near the top of the pretty_print_metar() function (around line 195) in phpweather.inc. -- 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 S. <sw...@ro...> - 2002-07-17 16:37:11
|
Hi again; where in v 1.61 can i find listings of the various data field names (eg = temp_c for temerature in *c) ? Thanks Martin Sweeney www.rokits.org/~martini=20 __________________ |
From: Martin S. <sw...@ro...> - 2002-07-17 16:12:36
|
Hi all; Ive just started using Phpweather v 1.61.=20 I have seen created a page called weather.php, and the following code is = the source; **Start** <html> <head> <body> <?php include('locale_en.inc'); include('phpweather.inc'); $metar =3D get_metar('EGGP'); $data =3D process_metar($metar); $temp =3D $data['temp_c']; echo "The temperature is $temp degrees Celsius."; ?> <?php $metar =3D get_metar('EGGP'); pretty_print_metar($metar, 'Rainhill, at the WRS Launch Site'); ?> <?php $decoded_metar =3D process_metar($metar); ?> <img src=3D"<?php get_temp_image($decoded_metar) ?>" height=3D"50" = width=3D"20" border=3D"1"> <img src=3D"<?php get_winddir_image($decoded_metar) ?>" height=3D"40" = width=3D"40" border=3D"1"> <img src=3D"<?php get_sky_image($decoded_metar) ?>" height=3D"50" = width=3D"80" border=3D"1"> <?php $data =3D process_metar(get_metar('EGGP')); echo "<pre>\n"; print_r($data); echo "</pre>\n"; ?> </body> </head> </html> **End** The error that comes up on the published page lists as so; <img src=3D" Fatal error: Call to undefined function: get_temp_image() in = /usr/local/psa/home/vhosts/rokits.org/web_users/martin/weather.php on = line 20 The pretty print code works (and can be seen at = www.rokits.org/~martin/weather.php) but the images do not. I am also using a database to cache metars if it matters. And, since there is no config setup on this new version, how do i alter = the time offset? Thanks in anticipation... Martin Sweeney www.rokits.org=20 |
From: Martin G. <gim...@gi...> - 2002-07-14 23:19:20
|
"Adam Fitch" <ad...@da...> writes: > I got PHP Weather running very quickly without any problem. But I have > no idea how to access the information as variables. Here's what the > documentation provided. > <? > $metar = get_metar('KIND'); // Indianapolis, IN - my home > $data = process_metar($metar); > $temp = $data['temp_f']; > ?> Does the above code work? If so, then it's very strange if you say that the $data array is empty... > so I attempted to loop through the $data array and echo out the values, > surprisingly no values came out what-so-ever. Did you use print_r() on $data? > using the pretty function, that returned absolutely nothing as well. > I read through the .inc files hoping to find something there. And I > can do it, but it would probably take me a full day of staring at it > to acquire the list that I'm looking for. You're looking for the lines that store values in the $decoded_metar array. > What I would like to have > is: > temp in farenheit Entry 'temp_f', > temp in celsius Entry 'temp_c', > clouds - (party cloudy, clear skies, etc.) That's a bit tricky as there can be several cloud-layers (up to three). But look for 'cloud_layer1_coverage' or 'cloud_layer1_condition' for the first layer. > visibility (in km and miles) Entries 'visibility_miles' and 'visibility_km', > etc, etc, etc, the more info I could have the better. > > I spent several hours trying to find documentation to tell me this. Yes, there isn't any documentation for this (except the source :-). You should also take a look at the code found in CVS: Individual files with diffs etc: http://cvs.sf.net/cgi-bin/viewcvs.cgi/phpweather/phpweather/ Snapshots: http://phpweather.sourceforge.net/downloads/ That code requires PHP version 4 and uses objects, but the decoding works much like the code you've seen. The advantage is that the array is documented, see this message: http://sourceforge.net/mailarchive/message.php?msg_id=1747747 -- 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-07-14 22:56:50
|
Ondrej Jombik <ne...@po...> writes: > Maxim, 19:33:27 > 14. jul 2002 (nedela) > Greetings! > > After holidays in the mountains I finished slovak version of > phpWeather translation. It is in the attachement. Finalization > exactly means that several tests was done. It seems to work fine > (with proper grammar handling, what was not the easy thing). Thanks a lot for the effort! I've commited it to CVS. > Please commit this into CVS. If I will improve the > translation, than I will send only diffs agains recent CVS version. > Please leave also notes at the end of pw_text_sk.php file for > several weeks. I will need them for further testing. Fine - I've commited the file as you sent it. > If there is also set of testing metars with some framework, > please publish it. I haven't looked at this since I proposed it :-( I'll also be on holiday for the next 14 days, so you'll probably have to do it yourself, or test the translation by hand... -- 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: Ondrej J. <ne...@po...> - 2002-07-14 17:54:59
|
Maxim, 19:33:27 14. jul 2002 (nedela) Greetings! After holidays in the mountains I finished slovak version of phpWeather translation. It is in the attachement. Finalization exactly means that several tests was done. It seems to work fine (with proper grammar handling, what was not the easy thing). Please commit this into CVS. If I will improve the translation, than I will send only diffs agains recent CVS version. Please leave also notes at the end of pw_text_sk.php file for several weeks. I will need them for further testing. If there is also set of testing metars with some framework, please publish it. I want to have only good feeling, that for every possibility it will output correct report. I don't like e-mails correcting grammar errors of content on our websites, because grammar is one from the things with the highest priorities. Best regards, =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, Open Source software developer, http://www.platon.sk/ |
From: Adam F. <ad...@da...> - 2002-07-13 04:15:13
|
I got PHP Weather running very quickly without any problem. But I have no idea how to access the information as variables. Here's what the documentation provided. <? $metar = get_metar('KIND'); // Indianapolis, IN - my home $data = process_metar($metar); $temp = $data['temp_f']; ?> so I attempted to loop through the $data array and echo out the values, surprisingly no values came out what-so-ever. using the pretty function, that returned absolutely nothing as well. I read through the .inc files hoping to find something there. And I can do it, but it would probably take me a full day of staring at it to acquire the list that I'm looking for. What I would like to have is: temp in farenheit temp in celsius clouds - (party cloudy, clear skies, etc.) visibility (in km and miles) etc, etc, etc, the more info I could have the better. I spent several hours trying to find documentation to tell me this. But couldn't come up with anything. Any help would be very much appreciated. -Adam Fitch ad...@da... |
From: Funder, J. O. <jh...@NA...> - 2002-07-11 19:58:37
|
Hi, Just a little comment on the station list: The following 2 stations are placed under France in the list which is wrong as they are located in Fiji FIR. AFTN IATA FIR AIRPORT Latitude Longitude NLWF FUT NFFF POINT VELE S14184100 W178035800 NLWW WLS NFFF HIHIFO S13141800 W176115600 PLCH is Christmas Island and should not be listed under NZ as it is located in Oakland FIR AFTN IATA FIR AIRPORT Latitude Longitude PLCH CXI KZAK CASSIDY INTL N01592820 W157213120 Also PLPA and PLWN are missing - some indicators do not exist anymore and new are appended.... ....it time to update the list. Johnny Funder -----Oprindelig meddelelse----- Fra: Martin Geisler [mailto:gim...@gi...] Sendt: 11. juli 2002 21:29 Til: php...@li... Emne: Re: List of station identifiers? eri...@pr... writes: > Hello, All: > > It's late, so I've probably overlooked the answer somewhere in > demo.php, but: Where can I obtain a list of all of the U.S. station > identifiers? You cannot do this using the version you've downloaded (1.6x - the latest released version.) You'll have to look at the code in CVS to find this information: http://cvs.sf.net/cgi-bin/viewcvs.cgi/phpweather/phpweather/stations.csv?rev =HEAD This file contains all the ICAOs we know about. You'll find a list under the ## US;United States ## section. -- 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. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: <no...@so...> - 2002-07-11 19:34:11
|
Feature Requests item #577808, was opened at 2002-07-05 17:25 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 Category: None Group: phpweather-2.x Status: Open >Resolution: Later Priority: 5 Submitted By: Fabrizio Di Meo (fdimeo) Assigned to: Nobody/Anonymous (nobody) Summary: TAF - Terminal Aerodrome Forecasts Initial Comment: Hi all, I think that would be really useful if phpweather were able to decode the TAF also, what do you think about? :o) ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2002-07-11 21:34 Message: Logged In: YES user_id=104098 Yes, it would be great if PHP Weather could parse TAF reports... but it can't do this at the moment, and it'll be a while before it can - unless someone finds the time to write the code that is :-) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-07-07 17:29 Message: Logged In: NO yes, id love it if i could get predictions too ;-) It would be well amazing, ontop of the already great current weather reports ;-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 |
From: Martin G. <gim...@gi...> - 2002-07-11 19:29:35
|
eri...@pr... writes: > Hello, All: > > It's late, so I've probably overlooked the answer somewhere in > demo.php, but: Where can I obtain a list of all of the U.S. station > identifiers? You cannot do this using the version you've downloaded (1.6x - the latest released version.) You'll have to look at the code in CVS to find this information: http://cvs.sf.net/cgi-bin/viewcvs.cgi/phpweather/phpweather/stations.csv?rev=HEAD This file contains all the ICAOs we know about. You'll find a list under the ## US;United States ## section. -- 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: James a. J. Wiles<kk...@ip...> - 2002-07-11 18:41:37
|
I must correct the link I gave earlier: The correct address for Phorecast is http://www.rtccom.net/~thammer/phorecast/ The previous link (www.phorecast.org) was for a web-based e-mail, contact and calender application. My mistake! Thanks, james wiles kk...@nc... -------- Forwarded message -------- Date: Thu, 11 Jul 2002 11:05:18 -0400 From: kk...@ip... Reply-to: kk...@nc... To: php...@li... Subject: Weather forecasts? Sunrise/Sunset? (fwd) There is a php-based package called Phorecast that will parse NOAA's 5-day local (ZONE) forecast data from their public servers. As is, it expects you to know the actual zone numbers for the various counties in your state (it does not provide a lookup by name). The cross-reference data should also be available somewhere on the NOAA servers. I don't have the link for it, but it shouldn't be hard to find. The author's e-mail is th...@rt... james wiles kk...@nc... -------- Forwarded message -------- Date: Thu, 11 Jul 2002 02:04:52 +0800 (GMT-8) From: kk...@ip... Reply-to: eri...@pr... To: php...@li... Subject: Weather forecasts? Sunrise/Sunset? Hello, All: I'd like to make 5-day forecasts, sunrise/sunset, and moon-phase information available on my Web site. Does NOAA/NWS even issue these types of information in a format that can be parsed (like METAR data)? Does PHPWeather handle these information types? -- Eric P. Sunnyvale, CA ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: James a. J. Wiles<kk...@ip...> - 2002-07-11 16:45:11
|
The link is phorecast.org Thanks, james wiles kk...@nc... -------- Forwarded message -------- Date: Thu, 11 Jul 2002 11:05:18 -0400 From: kk...@ip... Reply-to: kk...@nc... To: php...@li... Subject: Weather forecasts? Sunrise/Sunset? (fwd) There is a php-based package called Phorecast that will parse NOAA's 5-day local (ZONE) forecast data from their public servers. As is, it expects you to know the actual zone numbers for the various counties in your state (it does not provide a lookup by name). The cross-reference data should also be available somewhere on the NOAA servers. I don't have the link for it, but it shouldn't be hard to find. The author's e-mail is th...@rt... james wiles kk...@nc... -------- Forwarded message -------- Date: Thu, 11 Jul 2002 02:04:52 +0800 (GMT-8) From: kk...@ip... Reply-to: eri...@pr... To: php...@li... Subject: Weather forecasts? Sunrise/Sunset? Hello, All: I'd like to make 5-day forecasts, sunrise/sunset, and moon-phase information available on my Web site. Does NOAA/NWS even issue these types of information in a format that can be parsed (like METAR data)? Does PHPWeather handle these information types? -- Eric P. Sunnyvale, CA ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: James a. J. Wiles<kk...@ip...> - 2002-07-11 15:05:30
|
There is a php-based package called Phorecast that will parse NOAA's 5-day local (ZONE) forecast data from their public servers. As is, it expects you to know the actual zone numbers for the various counties in your state (it does not provide a lookup by name). The cross-reference data should also be available somewhere on the NOAA servers. I don't have the link for it, but it shouldn't be hard to find. The author's e-mail is th...@rt... james wiles kk...@nc... -------- Forwarded message -------- Date: Thu, 11 Jul 2002 02:04:52 +0800 (GMT-8) From: kk...@ip... Reply-to: eri...@pr... To: php...@li... Subject: Weather forecasts? Sunrise/Sunset? Hello, All: I'd like to make 5-day forecasts, sunrise/sunset, and moon-phase information available on my Web site. Does NOAA/NWS even issue these types of information in a format that can be parsed (like METAR data)? Does PHPWeather handle these information types? -- Eric P. Sunnyvale, CA ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: <eri...@pr...> - 2002-07-11 10:06:47
|
Hello, All: One more question: Is there a simple method for retrieving meteorological information by ZIP code? -- Eric P. Sunnyvale, CA |
From: <eri...@pr...> - 2002-07-11 10:05:27
|
Hello, All: It's late, so I've probably overlooked the answer somewhere in demo.php, but: Where can I obtain a list of all of the U.S. station identifiers? -- Eric P. Sunnyvale, CA |
From: <eri...@pr...> - 2002-07-11 10:03:01
|
Hello, All: I'd like to make 5-day forecasts, sunrise/sunset, and moon-phase information available on my Web site. Does NOAA/NWS even issue these types of information in a format that can be parsed (like METAR data)? Does PHPWeather handle these information types? -- Eric P. Sunnyvale, CA |
From: Martin G. <gim...@gi...> - 2002-07-07 22:10:41
|
Fabrizio Di Meo <fab...@ya...> writes: > Hi there, > just a question, I'm a new proud user of phpweather, I'd like to > know if it's able to decode the TAF format also... No, PHP Weather doesn't do that (yet?)... It would be very cool if it did, but as it is now, it doesn't. -- 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-07-07 15:29:43
|
Feature Requests item #577808, was opened at 2002-07-05 08:25 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 Category: None Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Fabrizio Di Meo (fdimeo) Assigned to: Nobody/Anonymous (nobody) Summary: TAF - Terminal Aerodrome Forecasts Initial Comment: Hi all, I think that would be really useful if phpweather were able to decode the TAF also, what do you think about? :o) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-07-07 08:29 Message: Logged In: NO yes, id love it if i could get predictions too ;-) It would be well amazing, ontop of the already great current weather reports ;-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 |
From: <no...@so...> - 2002-07-05 15:25:48
|
Feature Requests item #577808, was opened at 2002-07-05 15:25 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 Category: None Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Fabrizio Di Meo (fdimeo) Assigned to: Nobody/Anonymous (nobody) Summary: TAF - Terminal Aerodrome Forecasts Initial Comment: Hi all, I think that would be really useful if phpweather were able to decode the TAF also, what do you think about? :o) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=577808&group_id=23245 |
From: <fab...@ya...> - 2002-07-03 06:56:23
|
Hi there, just a question, I'm a new proud user of phpweather, I'd like to know if it's able to decode the TAF format also... Thank you in advance! Fabrizio ===== www.viapanisperna.org ______________________________________________________________________ Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità. http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/ |
From: Martin G. <gim...@gi...> - 2002-07-01 18:33:46
|
Martin Geisler <gim...@gi...> writes: > Hi everybody! >=20 > I've been doing some cleaning today on the 1.x version. Unless > someone objects, then I would like to make a release of the code > found in CVS very soon (tomorrow). It's about time that people get a > chance to enjoy the new icons! And that has now been done - the release note can be seen on the frontpage of Freshmeat right now :-) =2D-=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: Martin G. <gim...@gi...> - 2002-06-29 15:23:18
|
"Donovan A. Huff" <do...@hu...> writes: > What is the proper way to display the precipitation data? There's really no correct way... It's only some stations that reports the precipitation in their reports. The METAR for KVCT is KVCT 291451Z AUTO 10006KT 8SM -RA BKN022 23/23 A3001 RMK AO2 There's no information about the amount of precipitation. But there's a '-RA' part which is what the images.inc file uses to select an image with light rain. So, you cannot expect the 'precip_6h_in' entry to be set, just because it's raining - sorry. Perhaps you could use the 'weather' entry instead of precipitation? It says 'Light Rain' at the moment... =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Donovan A. H. <do...@hu...> - 2002-06-29 14:43:04
|
What is the proper way to display the precipitation data? If you visit: http://www.ednaonline.com/ you will see that it is currently raining, but the precipitation data is not being correctly pulled in. I would really like to get this fixed, especially now that it is raining and I can verify that it is raining. This is version 1.60. Here is the code: <?php include('./weather/locale_en.inc'); include('./weather/images.inc'); include('./weather/phpweather.inc'); $metar = get_metar('KVCT'); $decoded_metar=process_metar($metar); $data = process_metar($metar); $temp_f = $data['temp_f']; $windmph = $data['wind_miles_per_hour']; $winddir = $data['wind_dir_text_short']; $dewf = $data['dew_f']; $humidity = $data['rel_humidity']; $visibility = $data['visibility_miles']; if (empty($data['precip_6h_in'])) {$precipin = 'None';} else {$precipin = $data['precip_6h_in'];} echo "<table border=\"0\" cellpadding=\"0\" align=\"center\">"; echo "<tr><td valign=top width=\"50%\" td align=\"center\" nowrap>"; echo "<div align=\"center\"><img src=\"img/localw.jpg\" height=\"50\" width=\"73\" border=\"0\">"; echo "</div></td><td valign=top width=\"50%\" td align=\"center\" nowrap>"; echo "<img src=";echo " '" . get_sky_image($decoded_metar) . "'";echo "height=\"50\" width=\"80\" border=\"0\"></div></td></tr></table>"; echo "<table border=\"0\" cellpadding=\"0\" align=\"center\">"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Temp:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$temp_f °F</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Wind:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$windmph mph $winddir</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Dew Point:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$dewf °F</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Humidity:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$humidity %</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Visibility:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$visibility m</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Precipitation:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$precipin</font></div></td></tr>"; ?> |
From: Martin G. <gim...@gi...> - 2002-06-29 11:33:30
|
Ondrej Jombik <ne...@po...> writes: > Maxim, 20:46:05 > 28. jun 2002 (piatok) > Greetings! >=20 > Following metar causes several warnings: >=20 > cc: IN, icao: VABB > 201530Z VABB 24012KT 5000 FU FEW018 SCT025 28/22 Q1004 NOSIG Thanks for the report - I've tried to fix it. Raymond: is the fix correct? =20 > I have one another question. What does it means "The > temperature feels like"? I don't understand this issue, so I can't > properly translate it into Slovak language. I hope your explaination > will help me. I'll give it a try: By combining the windspeed and the temperature we can calculate a 'windchill' factor. This temperature tells you how a human would perceive the temperature, e.g. the wind feels cold if it's blowing strong. Likewise, by combining the temperature and relative humidity we can calculate a 'heatindex'. This is only used if it's hot. One of these temperatures are appended to the 'feelslike' string. By the way: I think we should change this so that the 'feelslike' string is used as a format string to sprintf() instead of just appending the temperature to it. By using the string as a format, it's easy for the translator to put text after the temperature - that isn't possible now. That applies for a lot of the strings: the code in pw_test.php should not just concatenate the strings (like it does now) - we should use sprintf() instead. And now that we're only interested in PHP4 and later, then we can use *argument swapping* like this: $format1 =3D 'There are %d monkeys in the %s'; $format2 =3D 'The %2$s contains %1$d monkeys.'; where both formats can be used with the same call to printf(): printf($format, $num, $location); This is a powerful technique which we ought to take advantage of. =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |