phpweather-devel Mailing List for PHP Weather (Page 9)
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: Dan M. <da...@da...> - 2003-05-12 16:58:14
|
I have figured out after struggling a bit how to pull most of the information in 2.1.2, but I am still having difficulties pulling "Clouds" and "Weather." I know that the information is in an array, but I am unclear on how to bring it out of the array. I also cannot seem to pull wind direction (SW, NW, W), but I can pull the compass degree (135, 90, 110). Here is the code: $weather = new phpweather(); $icons = new pw_images($weather); $location = $weather->get_location(); $image = $icons->get_sky_image(); $data = $weather->decode_metar(); $temp = $data[temperature]; $windvar = $data[wind]; <-----This Doesn't Work $cloudvar = $data[clouds]; <-----This Doesn't Work $time = date("m/d/y g:i a",($data[time])); $weathervar = $data[weather]; echo "\n"; echo "<div align='center'> Portland, Oregon<br /> <img src=\"$image\" height='45' width='75' border='0' alt='Current Sky' />"; echo "<br />$weathervar[condition]<br /> </div>"; echo "<b>Temperature:</b> $temp[temp_f]°F<br />"; echo "<b>Humidity:</b> $data[rel_humidity]%<br />"; echo "<b>Wind:</b> $windvar[miles_per_hour]mph<br /> <div align='center'>$time</div> "; Thank you, Dan Martin |
From: Pedro L. <li...@le...> - 2003-05-12 15:09:10
|
Hi Martin, and everyone else: I'm sorry, I've gotten lazy about reading my mailing lists lately. I actually went back to version 1.62 since I couldn't get version 2 working right for me. I'll take a look at your write up and if I still have problems I'll be patient and post them here. Thanks for your help, I really like this app :) -Pedro On Thu, May 01, 2003 at 12:35:26AM +0200, Martin Geisler wrote: > Pedro Leitao <li...@le...> writes: > > > Ohh, one more thing.. the other problem I'm seeing is that data will > > not update. I have built a page that displays the paragraph form of > > the weather data, but that will go stale, even reporting that the > > last update was done 8 hours ago: > > http://www.stpatrickhighschool.org/weather/ > > Sorry about the long responce time --- the list isn't dead, but it's > sometimes close... I've had some problems with my DNS server lately > and therefore I haven't checked my mail. > > Back to your problem --- I've just checked your page and it says 'As > of 37 minutes ago'. Does that mean that it works now, or was I just > lucky? > > I give a quick recap of how to use PhpWeather in this mail, if you > haven't already seen this mail, then perhaps you'll find it useful: > > http://makeashorterlink.com/?E16D42664 > > -- > 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. > Join Freenet: http://gimpster.com/downloads/freenet/ > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Pedro L. <li...@le...> - 2003-05-12 15:00:44
|
Hey Guys, I'm actually using PHPWeather 1.62 at http://www.stpatrickhighschool.org/we= ather, you can see it intergrated into PostNuke at http://www.stpatrickhighschool.= org. I still have to change the background colors on the sky images. I was trying to do the same with version 2.1.2, but I couldn't get it working right, I'm= not good with php. I've just gotten around to reading my mailing lists and Mart= in sent me a write up on version 2.1.2, so I'll give that a try. If you want to do something similar to what I have done, the html code is at the bottom. I'm really sorry for being lazy and not putting line breaks on the code, bu= t that's the actual index.php that I run from a cron which directs it's output to a = flat html file which I then include in the PostNuke page. I did this because for= some reason the straight php file wouldn't display right and if the flat html pa= ge had any line breaks in it, it would display those as line breaks in the html ma= king it very ugly... it's retarted, I know, but I got it working that way :) If I get version 2.1.2 to work the same way, then I'll send the html code f= or that. Take this into an editor and insert line breaks, this is using version 1.62= and=20 a flat cache page. <html><head><style type=3D"text/css">("/themes/PostNuke/style/style.css"); = </style></head><body><?php include('/home/www/stpatrickhighschool/htdocs/we= ather/images.inc'); include('/home/www/stpatrickhighschool/htdocs/weather/l= ocale_en.inc'); include('/home/www/stpatrickhighschool/htdocs/weather/phpwe= ather.inc'); $metar =3D get_metar('KEWR'); $decoded_metar =3D process_metar= ($metar); $data =3D process_metar($metar); $temp =3D $data['temp_f']; $minu= tes_old =3D round((time() - $data['time'])/60); ?> <table width=3D"190" bor= der=3D"0" cellspacing=3D"0" cellpadding=3D"0"> <tr> <td><div align=3D"cente= r"><font size=3D"2"><strong>Elizabeth, New Jersey</strong></font></div></td= > </tr> <tr> <td><table width=3D"100%" border=3D"0" align=3D"center" cellpa= dding=3D"0" cellspacing=3D"0"> <tr> <td width=3D"44%" height=3D"40" rowspan= =3D"4" align=3D"center" valign=3D"top"> <br> <img src=3D"/weather/<?php get= _sky_image($decoded_metar) ?>" height=3D"45" width=3D"75" border=3D"0" alt= =3D"Current Sky"><br><?php echo "$data[cloud_layer1_condition]";?> </td> <t= d width=3D"10%" rowspan=3D"4"> </td> <td width=3D"31%" height=3D"19" a= lign=3D"right" valign=3D"bottom"> </td> <td width=3D"15%" valign=3D"m= iddle"> </td> </tr> <tr> <td height=3D"1" align=3D"right" valign=3D"mi= ddle"><font size=3D"5"><strong><?php echo "$temp°F"; ?></strong></font>= </td> <td width=3D"15%" rowspan=3D"3" align=3D"right" valign=3D"top"><img = src=3D"/weather/<?php get_temp_image($decoded_metar) ?>" height=3D"50" widt= h=3D"20" border=3D"0" alt=3D"Current Temperature"></td> </tr> <tr> <td alig= n=3D"right" valign=3D"bottom"><strong><font size=3D"2"><?php echo "$data[te= mp_c]°C";?></font></strong></td> </tr> <tr> <td align=3D"right" valign= =3D"top"><font size=3D"4"><strong> </strong></font></td> </tr> </table= ></td> </tr> <tr> <td><div align=3D"center"></div></td> </tr> <tr> <td alig= n=3D"center" valign=3D"top"><br> <table width=3D"100%" height=3D"130" borde= r=3D"0" align=3D"center" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td widt= h=3D"64" height=3D"20" align=3D"left" valign=3D"top"><font size=3D"2"> = ;Humidity:</font></td> <td width=3D"10" height=3D"20" align=3D"left" valign= =3D"top"> </td> <td width=3D"109" align=3D"left" valign=3D"top"><font = size=3D"2"><?php echo "$data[rel_humidity]%";?></font></td> </tr> <tr> <td = align=3D"left" valign=3D"top"><font size=3D"2"> Wind:</font></td> <td = height=3D"28" align=3D"left" valign=3D"top"> </td> <td height=3D"28" a= lign=3D"left" valign=3D"top"><font size=3D"2"><?php echo "From the $data[wi= nd_dir_text] at $data[wind_miles_per_hour] mph";?></font></td> </tr> <tr> <= td align=3D"left" valign=3D"top"><font size=3D"2"> Windchill:</font></= td> <td height=3D"20" align=3D"left" valign=3D"top"> </td> <td height= =3D"20" align=3D"left" valign=3D"top"><font size=3D"2"><?php echo "$data[wi= ndchill_f]°F";?></font></td> </tr> <tr align=3D"center" valign=3D"middl= e"> <td align=3D"left" valign=3D"top"><font size=3D"2"> Pressure:</fon= t></td> <td height=3D"20" align=3D"left" valign=3D"top"> </td> <td hei= ght=3D"20" align=3D"left" valign=3D"top"><font size=3D"2"><?php echo "$data= [altimeter_inhg] inches";?></font></td> </tr> <tr align=3D"center" valign= =3D"middle"> <td height=3D"20" align=3D"left" valign=3D"top"><font size=3D"= 2"> Visibility:</font></td> <td height=3D"20" align=3D"left" valign=3D= "top"> </td> <td height=3D"20" align=3D"left" valign=3D"top"><font siz= e=3D"2"><?php echo "$data[visibility_miles] miles";?></font></td> </tr> <tr= align=3D"center" valign=3D"middle"> <td height=3D"22" colspan=3D"4"><font = size=3D"1">As of </font><font size=3D"1"><?php echo "$minutes_old";?> minut= es ago</font></td> </tr> </table></td> </tr> </table></body></html> Here's the cache file; /tmp/weather-cache.xml <?xml version=3D"1.0" encoding=3D"UTF-8" ?> <metardata> <cache station=3D"KEWR" metar=3D"KEWR 121351Z 14005KT 1SM HZ OVC009= 16/13 A2956 RMK AO2 SFC VIS 5 CIG 008V015 SLP008 T01610133" timestamp=3D"1= 052747460" /> </metardata> -Pedro On Thu, May 08, 2003 at 09:52:38PM +0200, Martin Geisler wrote: > Dan Martin <da...@da...> writes: >=20 > Hi Dan >=20 > > I initially tried utilizing PHP Weather 2.1.2 and I can get things > > to work. >=20 > Good, that's always nice to hear! :-) >=20 > > But I do not like the format of pretty print. I want a format > > similar to what Pedro Leitao has at > > http://www.stpatrickhighschool.org/weather/ , but I cannot seem to > > pull the variables needed to do so. >=20 > Perhaps we can persuade Pedro to reveal his nifty code? :-) I would be > very happy to include it as a second choice of output method for > PhpWeather. Infact, this is just the kind of output that PhpWeather > needs, I've never gotten around to making a proper tabular output. >=20 > > I am using 1.62, however it only work some of the time. Most of the > > time it cannot pull the data. Would it be better to pull it into > > MySQL using a hourly crontab, and query from there? >=20 > There shouldn't be any difference --- PhpWeather is basically doing > just that, or rather it's supposed to be doing that. >=20 > > As you can probably tell I am not too proficient at PHP. > > > > I would appreciate any help. >=20 > We'll see what we can do. >=20 > --=20 > Martin Geisler My GnuPG Key: 0xF7F6B57B >=20 > 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. > Join Freenet: http://gimpster.com/downloads/freenet/ >=20 >=20 > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com >=20 > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Martin G. <gim...@gi...> - 2003-05-10 09:22:29
|
"John Corry" <jo...@ne...> writes: > I just downloaded phpweather and installed it on my windows machine > running apache. > > I set up a virtual host in httpd.conf resolving to phpweather > directory. > > When I generate a report, icons are missing on the page, even though > the source generated has what looks like a corretn path to the > icons. > > The config file lists 'icons/' as the icons directory. Yep, you've found the correct option --- this is the relative path that is put into the HTML. > When I use windows explorer to look in the phpweather/icons > directory, all of the icons are there. But when I browse that > directory through the webserver, I get all these weird > non-phpweather files...WTF!? It's almost like there's a symlink or > something...though nothing like that has been set up for this > directory/vhost (not that I even could on windows) Hehe, this does look strange... But there's a perfectly natural explaination :-) I bet you're seeing a directory listing like this: Index of /icons Name Last modified Size Description Parent Directory 18-Aug-2001 15:21 - a.gif 22-Feb-1996 12:45 1k a.png 30-May-2001 09:47 1k alert.black.gif 22-Feb-1996 12:45 1k alert.black.png 30-May-2001 09:47 1k alert.red.gif 22-Feb-1996 12:45 1k alert.red.png 30-May-2001 09:47 1k ... This comes from the default Apache configuration which has this line: Alias /icons/ /usr/share/apache/icons/ It's these icons that are used when Apache makes directory listings. I suggest that you put the icons for PhpWeather in another directory, or that you don't move them at all. -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: John C. <jo...@ne...> - 2003-05-10 05:02:23
|
I just downloaded phpweather and installed it on my windows machine running apache. I set up a virtual host in httpd.conf resolving to phpweather directory. When I generate a report, icons are missing on the page, even though the source generated has what looks like a corretn path to the icons. The config file lists 'icons/' as the icons directory. When I use windows explorer to look in the phpweather/icons directory, all of the icons are there. But when I browse that directory through the webserver, I get all these weird non-phpweather files...WTF!? It's almost like there's a symlink or something...though nothing like that has been set up for this directory/vhost (not that I even could on windows) Can anyone help me figure out what's going on!? Php 4.3.1 Apache/1.3.26 Win XP pro Thanks, John Corry |
From: Geoff S. <ge...@fo...> - 2003-05-10 00:18:59
|
> > But I do not like the format of pretty print. I want a format > > similar to what Pedro Leitao has at > > http://www.stpatrickhighschool.org/weather/ , but I cannot seem to > > pull the variables needed to do so. I have something along the same lines on http://www.nottingham.uk.net I worked out the variables with a little experimentation and code reading. If you want the code let me know and I'll mail it to you. The next bit (when I get time to sit down and finish it) is a thermometer that changes with the temperature... just need to sort out the graphics. -- Geoff Smith <ge...@fo...> "Step aside everyone! Sensitive love letters are my speciality... 'Dear Baby, Welcome to Dumpsville. Population: you.'" - Homer Simpson |
From: Martin G. <gim...@gi...> - 2003-05-09 23:21:05
|
Bryan Koschmann - GKT <gk...@gk...> writes: > On Thu, 8 May 2003, Martin Geisler wrote: > > |Hmm... This is the first report of this, so I don't have a fix for > |it. But perhaps it has something to do with your browser not > |accepting cookies? The configuration is done using a PHP session > |which is identified using a cookie. > > I'm using mozilla 1.3 with all cookies enabled. That's what it was > sounding like to me, but the odd part is I was expecting some output > on the screen at least. Yes, there should always be some output. I've just tried the configurator myself after having instructed Mozilla to deny all cookies from my machine --- it still works (which is cool if it were not for the fact that it doesn't bring us any closer to solving your problem...). > Viewing source shows only the <html><body></body></html> like when a > script errors out, but I see no errors in the log either. The <html><body></body></html> string seams to be what Mozilla inserts when it loads an empty document --- I just tried it with a completely empty HTML file and the <html>... string what there in Mozilla. It's a a bit strange that it insists on inserting these tags... > |If the session-logic gets confused, then try loading the > |reset_session.php file in the config directory. That should delete > |the session cookie if you have one. > > I will try that next time, maybe see if I can get any further. Are > there any PHP settings that it needs that I should know about? I'm just running a standard setup using PHP 4.2.3 from Debian unstable. I just gave PhpWeather a try with safe-mode turned on and things still worked. > |> Using PHP 4.3.1. > | > |Thanks, it's valuable to know that you're using a recent version > |and not some 2-3 years old PHP3 :-) > > Well I try to stay on top :) Great! It's so annoying to have to keep supporting versions of PHP that are several years old... -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Bryan K. - G. <gk...@gk...> - 2003-05-09 08:17:25
|
On Thu, 8 May 2003, Martin Geisler wrote: |Hmm... This is the first report of this, so I don't have a fix for it. |But perhaps it has something to do with your browser not accepting |cookies? The configuration is done using a PHP session which is |identified using a cookie. I'm using mozilla 1.3 with all cookies enabled. That's what it was sounding like to me, but the odd part is I was expecting some output on the screen at least. Viewing source shows only the <html><body></body></html> like when a script errors out, but I see no errors in the log either. |If the session-logic gets confused, then try loading the |reset_session.php file in the config directory. That should delete |the session cookie if you have one. I will try that next time, maybe see if I can get any further. Are there any PHP settings that it needs that I should know about? |> Using PHP 4.3.1. | |Thanks, it's valuable to know that you're using a recent version and |not some 2-3 years old PHP3 :-) Well I try to stay on top :) Thanks for the reply! Bryan |
From: Martin G. <gim...@gi...> - 2003-05-09 02:19:53
|
Dan Martin <da...@da...> writes: Hi Dan > I initially tried utilizing PHP Weather 2.1.2 and I can get things > to work. Good, that's always nice to hear! :-) > But I do not like the format of pretty print. I want a format > similar to what Pedro Leitao has at > http://www.stpatrickhighschool.org/weather/ , but I cannot seem to > pull the variables needed to do so. Perhaps we can persuade Pedro to reveal his nifty code? :-) I would be very happy to include it as a second choice of output method for PhpWeather. Infact, this is just the kind of output that PhpWeather needs, I've never gotten around to making a proper tabular output. > I am using 1.62, however it only work some of the time. Most of the > time it cannot pull the data. Would it be better to pull it into > MySQL using a hourly crontab, and query from there? There shouldn't be any difference --- PhpWeather is basically doing just that, or rather it's supposed to be doing that. > As you can probably tell I am not too proficient at PHP. > > I would appreciate any help. We'll see what we can do. -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Martin G. <gim...@gi...> - 2003-05-09 00:11:32
|
Bryan Koschmann - GKT <gk...@gk...> writes: > I just untarred the latest tarball, pointed my browser there and > went to the configuration screen. > > I showed the first set of options and chose them accordingly. > However, when I hit update options, I just get a blank page. Then, > trying to go back gives me a blank page as well. > > Can anyone give me an idea what is wrong and how to fix it? Hmm... This is the first report of this, so I don't have a fix for it. But perhaps it has something to do with your browser not accepting cookies? The configuration is done using a PHP session which is identified using a cookie. If the session-logic gets confused, then try loading the reset_session.php file in the config directory. That should delete the session cookie if you have one. > Using PHP 4.3.1. Thanks, it's valuable to know that you're using a recent version and not some 2-3 years old PHP3 :-) -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Bryan K. - G. <gk...@gk...> - 2003-05-08 17:46:09
|
I just untarred the latest tarball, pointed my browser there and went to the configuration screen. I showed the first set of options and chose them accordingly. However, when I hit update options, I just get a blank page. Then, trying to go back gives me a blank page as well. Can anyone give me an idea what is wrong and how to fix it? Using PHP 4.3.1. Thanks, Bryan |
From: Dan M. <da...@da...> - 2003-05-07 00:22:40
|
I initially tried utilizing PHP Weather 2.1.2 and I can get things to work. But I do not like the format of pretty print. I want a format similar to what Pedro Leitao has at http://www.stpatrickhighschool.org/weather/ , but I cannot seem to pull the variables needed to do so. I am using 1.62, however it only work some of the time. Most of the time it cannot pull the data. Would it be better to pull it into MySQL using a hourly crontab, and query from there? As you can probably tell I am not too proficient at PHP. I would appreciate any help. Thank you, Dan Martin |
From: Max H. <ma...@fl...> - 2003-05-06 17:14:06
|
> > I have a lycos.co.uk account and have just uploaded via ftp all the > > files for phpweather 2.1.2, now when i click on the sites ftp client > > to show me my files, i had done as suggested and made a directory > > called, phpweather. now when i clicked on index.php, i had to > > obviously preview the file. it then gave me a message when read as > > follows. Fatal Error: cannot instantiate non-existent class: > > pw_db_null in db_layer.php on line 52. > I think you're the first who has seen this error --- it's supposed to > be something that cannot happen... The error says that the 'new' call > in line 52 has failed because there's no class definition of > pw_db_null. The definition is stored in the file included in line 51, > so it really should work: > > include_once(PHPWEATHER_BASE_DIR . '/db/pw_db_null.php'); > $this->db = new pw_db_null($this->properties); > > I don't have any good suggestions for you :-( Only thing i'd suggest is to try hard-coding the path to PHPWEATHER_BASE_DIR. Aron, do you get any errors about "could not find file xyz for include" or whatever (i'm getting rusty - i can't remember exactly what it'll say) What exactly do you mean by "i had to obviously preview the file." Cheers, Max |
From: Martin G. <gim...@gi...> - 2003-05-06 14:40:17
|
Aqa...@ao... writes: Hi Aron, > I have a lycos.co.uk account and have just uploaded via ftp all the > files for phpweather 2.1.2, now when i click on the sites ftp client > to show me my files, i had done as suggested and made a directory > called, phpweather. now when i clicked on index.php, i had to > obviously preview the file. it then gave me a message when read as > follows. Fatal Error: cannot instantiate non-existent class: > pw_db_null in db_layer.php on line 52. > > What does this all mean? i have no experience in php, i do know that > lycos.co.uk is using php 4 i think. I think you're the first who has seen this error --- it's supposed to be something that cannot happen... The error says that the 'new' call in line 52 has failed because there's no class definition of pw_db_null. The definition is stored in the file included in line 51, so it really should work: include_once(PHPWEATHER_BASE_DIR . '/db/pw_db_null.php'); $this->db = new pw_db_null($this->properties); I don't have any good suggestions for you :-( > I had created a home page with their template, not because i did not > have experience, simply to save time, until i had upload this php > thingy. Please help me as soon as possible please. > > How do i create my home page with with index.php? The first thing you'll want to do, is to get the index.php page from PhpWeather working. Then you can start integrating PhpWeather into the design on your homepage. > Please tell me in easy to understand language, and geek lingo, many > thanks Aron Brookes We'll do our best, but ask again if you need to. -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: <Aqa...@ao...> - 2003-05-04 16:18:43
|
I have a lycos.co.uk account and have just uploaded via ftp all the files for phpweather 2.1.2, now when i click on the sites ftp client to show me my files, i had done as suggested and made a directory called, phpweather. now when i clicked on index.php, i had to obviously preview the file. it then gave me a message when read as follows. Fatal Error: cannot instantiate non-existent class: pw_db_null in db_layer.php on line 52. What does this all mean? i have no experience in php, i do know that lycos.co.uk is using php 4 i think. I had created a home page with their template, not because i did not have experience, simply to save time, until i had upload this php thingy. Please help me as soon as possible please. How do i create my home page with with index.php? Please tell me in easy to understand language, and geek lingo, many thanks Aron Brookes |
From: Martin G. <gim...@gi...> - 2003-05-03 11:27:24
|
"norman van wijnen" <n.v...@ho...> writes: > Hi , Hi Norman. I've send a copy of this reply to the PhpWeather mailinglist at php...@li.... I suggest that you join the list so that we can troble-shoot your problem there. The list is SPAM protected, so you have to join before sending mails to it. You can join there: https://lists.sourceforge.net/lists/listinfo/phpweather-devel > at first I wanna thank you for that great software you made. > > It's only that I have a problem with it. > > I'am running the software on a Sun Solaris server OS version 9 and > everything seems to works fine after install. Great, it's nice to know that things also work there! > After making a defaults.php file the software has to be in dutch but > nothing happens. > > So I think that in a way the defaults.php file could not read from > the install directory. Hmm, if I remember correctly, then this is the second report about this... very strange. > reading in your log files I found a way (i thought) to code the path > to the install directory by edit the phpweather.php file. > > I put this line in it: > > define('PHPWEATHER_BASE_DIR', > gcwd() . '/u01/documents/wheater/phpweather-2.1.2'); > > and I removed the original line. Could you try and see what dirname(__FILE__) return when put into a PHP script in the PhpWeather installation program. It is supposed to return the path to the installation directory of PhpWeather. If it doesn't return the right path, then try with realpath(dirname(__FILE__)). The realpath() function resolves symbolic links and '/../' constructs. In short, just make a file with <?php echo dirname(__FILE__) . "\n"; echo realpath(dirname(__FILE__)) . "\n"; ?> and then mail us the result as seen in the source in your browser. > It returns the following error: > > Fatal error: Call to undefined function: gcwd() in > /u01/documents/wheater/phpweather-2.1.2/phpweather.php on line 12 There's no gcwd() function in PHP as far as I know, and PhpWeather doesn't define one, so it's only natural that PHP complains. What should the gcwd() function do? > Can you tell me if there is a way to let the software get use of the > defaults.php file? It's supposed to be really easy (copy defaults-dist.php to defaults.php and change what you want) but something strange is giving us trouble... > Regards > > Norman > (the netherlands) -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Martin G. <gim...@gi...> - 2003-04-30 22:35:51
|
Pedro Leitao <li...@le...> writes: > Ohh, one more thing.. the other problem I'm seeing is that data will > not update. I have built a page that displays the paragraph form of > the weather data, but that will go stale, even reporting that the > last update was done 8 hours ago: > http://www.stpatrickhighschool.org/weather/ Sorry about the long responce time --- the list isn't dead, but it's sometimes close... I've had some problems with my DNS server lately and therefore I haven't checked my mail. Back to your problem --- I've just checked your page and it says 'As of 37 minutes ago'. Does that mean that it works now, or was I just lucky? I give a quick recap of how to use PhpWeather in this mail, if you haven't already seen this mail, then perhaps you'll find it useful: http://makeashorterlink.com/?E16D42664 -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Pedro L. <li...@le...> - 2003-04-25 22:33:27
|
Ohh, one more thing.. the other problem I'm seeing is that data will not update. I have built a page that displays the paragraph form of the weather data, but that will go stale, even reporting that the last update was done 8 hours ago: http://www.stpatrickhighschool.org/weather/ -Pedro On Fri, Apr 25, 2003 at 01:03:55PM -0400, Pedro Leitao wrote: > > I don't know if this list is active or not, but here goes... > I've been using phpweather for a while, actually version 1.62. > I'm now playing with version 2.1.2 using MySQL. I'm not very > familiar with php, but I was able to get version 1.62 working. > I actually found some examples, so that made it easier. > I used to run this from a php page; > <?php > include('weather/images.inc'); > include('weather/locale_en.inc'); > include('weather/phpweather.inc'); > $metar = get_metar('KEWR'); > $decoded_metar = process_metar($metar); > $data = process_metar($metar); > $temp = $data['temp_f']; > $minutes_old = round((time() - $data['time'])/60); > ?> > > Then print out the results; > <?php get_sky_image($decoded_metar) ?> > <?php echo "$data[cloud_layer1_condition]";?> > <?php get_temp_image($decoded_metar) ?> > <?php echo "$temp°F"; ?> > <?php echo "$data[temp_c]°C";?> > <?php echo "$data[rel_humidity]%";?> > <?php echo "$data[visibility_miles] miles";?> > <?php echo "$data[wind_miles_per_hour] mph from $data[wind_dir_text]";?> > <?php echo "$data[windchill_f]°F";?> > <?php echo "$minutes_old";?> > > I noticed that some variables and array names have changed, and possibly > the way to call them. I've got a couple of things working like temperature > and wind speed, but what I'm looking for is the same results I used to get. > I used <?php print_r($data); ?> to display all the data in this array, but > what I'm really looking for is a way to print out each detail in the METAR > seperately, like I used to do. > > Thanks in advance, > -Pedro > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Pedro L. <li...@le...> - 2003-04-25 17:04:08
|
I don't know if this list is active or not, but here goes... I've been using phpweather for a while, actually version 1.62. I'm now playing with version 2.1.2 using MySQL. I'm not very familiar with php, but I was able to get version 1.62 working. I actually found some examples, so that made it easier. I used to run this from a php page; <?php include('weather/images.inc'); include('weather/locale_en.inc'); include('weather/phpweather.inc'); $metar = get_metar('KEWR'); $decoded_metar = process_metar($metar); $data = process_metar($metar); $temp = $data['temp_f']; $minutes_old = round((time() - $data['time'])/60); ?> Then print out the results; <?php get_sky_image($decoded_metar) ?> <?php echo "$data[cloud_layer1_condition]";?> <?php get_temp_image($decoded_metar) ?> <?php echo "$temp°F"; ?> <?php echo "$data[temp_c]°C";?> <?php echo "$data[rel_humidity]%";?> <?php echo "$data[visibility_miles] miles";?> <?php echo "$data[wind_miles_per_hour] mph from $data[wind_dir_text]";?> <?php echo "$data[windchill_f]°F";?> <?php echo "$minutes_old";?> I noticed that some variables and array names have changed, and possibly the way to call them. I've got a couple of things working like temperature and wind speed, but what I'm looking for is the same results I used to get. I used <?php print_r($data); ?> to display all the data in this array, but what I'm really looking for is a way to print out each detail in the METAR seperately, like I used to do. Thanks in advance, -Pedro |
From: SourceForge.net <no...@so...> - 2003-04-22 20:41:47
|
Feature Requests item #722729, was opened at 2003-04-16 22:52 Message generated for change (Comment added) made by gimpster You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=722729&group_id=23245 Category: Decoding Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Etienne Tourigny (etienne_t) Assigned to: Nobody/Anonymous (nobody) Summary: add support for FD text (winds aloft) Initial Comment: Greetings, Are there any plans to get FD text data? I would use that for flight planning purpose. I am a seaconed php programmer so I have no qualms in getting my hands dirty. Do you know any public facilities for retrieving FD text previsions (winds aloft) for international areas? The U.S. noaa web-site and ftp site give you that information but for US areas only. ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2003-04-22 22:41 Message: Logged In: YES user_id=104098 I don't have any plans to add this to PHP Weather, but you're very welcome to do so :-) PHP Weather could use such a new feature... I'm not an aviator, so I don't really know all that much about this stuff, neither do I know where you can get this kind of information for European airports. But try asking the NOAA, perhaps they know something. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=722729&group_id=23245 |
From: Martin G. <gim...@gi...> - 2003-04-20 17:27:23
|
Aqa...@ao... writes: > I have created a weather site, but was looking for something that > could collect data for free, but everyone wanted to charge me. > > I knew that that wasn't right, and that there had to be software > available for free, to collect weather conditions for all over the > world. The data comes from the National Weather Service, you can also download them for free from: http://weather.noaa.gov/weather/metar.shtml PHP Weather downloads these reports, parses them and presents the output in several languages. > I have windows xp home edition and don't have a personal webserver, > only a website. Okay, that should be enough if the website supports PHP. > I need some easy to understand instructions on how to put the right > files onto my website's server. > > I don't understand what unter the tarball means? do i have to > upload every file that i have download to my website's server? and > how do i create a page to bring up the weather information for this? > your replay and help would be highly appreciated. Since you don't know what a "tarball" is, then you should probably use a zipfile instead (a tarball is much the same as a zipfile, it just don't use the zip program). Download the zipfile and unpack it: http://makeashorterlink.com/?Z47213744 You then upload all the files to your webserver, put them in a new directory called "phpweather" or something like that. You should then be able to load the index.php file (in the new directory) from your server. If you have access to a database, then you can configure PHP Weather to use this to speed things up, but it isn't mandatory. -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: <Aqa...@ao...> - 2003-04-17 23:28:23
|
I am a little new to this system. I have created a weather site, but was looking for something that could collect data for free, but everyone wanted to charge me. I knew that that wasn't right, and that there had to be software available for free, to collect weather conditions for all over the world. I need a little help has stated i am a newbie to this, so please bare with me. I have windows xp home edition and don't have a personal webserver, only a website. I need some easy to understand instructions on how to put the right files onto my website's server. I don't understand what unter the tarball means? do i have to upload every file that i have download to my website's server? and how do i create a page to bring up the weather information for this? your replay and help would be highly appreciated. Thanks Aron Brookes |
From: SourceForge.net <no...@so...> - 2003-04-16 20:35:09
|
Feature Requests item #722729, was opened at 2003-04-16 16:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=722729&group_id=23245 Category: Decoding Group: phpweather-2.x Status: Open Resolution: None Priority: 5 Submitted By: Etienne Tourigny (etienne_t) Assigned to: Nobody/Anonymous (nobody) Summary: add support for FD text (winds aloft) Initial Comment: Greetings, Are there any plans to get FD text data? I would use that for flight planning purpose. I am a seaconed php programmer so I have no qualms in getting my hands dirty. Do you know any public facilities for retrieving FD text previsions (winds aloft) for international areas? The U.S. noaa web-site and ftp site give you that information but for US areas only. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=722729&group_id=23245 |
From: Martin G. <gim...@gi...> - 2003-04-16 18:42:17
|
Jonathan Drucker <jo...@ya...> writes: > Hey everyone. I am having trouble getting phpWeather to show on my > site. I am not quite sure how to get it to be implemented. First, you have to decide where you would like to show it, and if you want to show the big text report. When you've found the right spot in your HTML code, then it's mostly a matter of inserting PHP code like this: <?php require('path/to/phpweather.php'); require(PHPWEATHER_BASE_DIR . 'pw_utilities.php'); require(PHPWEATHER_BASE_DIR . '/output/pw_text_en.php'); include(PHPWEATHER_BASE_DIR . '/output/pw_images.php'); $weather = new phpweather(); $text = new pw_text_en($weather); $icons = new pw_images($weather); echo "<blockquote>\n"; $text->print_pretty() echo "</blockquote>\n"; echo "<p>The matching icons are:</p>\n"; echo "<blockquote>\n" . '<img src="' . $icons->get_sky_image() . '" height="50" width="80" border="1" alt="Current weather in ' . $weather->get_location() . '" /> ' . '<img src="' . $icons->get_winddir_image() . '" 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 temperature in ' . $weather->get_location() . '" />' . "\n</blockquote>\n"; ?> The basic idea is, that you first tell PHP that you require some PhpWeather files, then you create your $weather object. This can give you the name of the station with $weather->get_location() and it's used to create a $text and an $icons object. The $text object will give you the big text report when you call the print_pretty() method: $text->print_pretty(); In the above code I've wrapped the report in <blockquote> tags, adjust as needed. The $icons object will give you three URLs: $icons->get_sky_image(), $icons->get_winddir_image(), and $icons->$icons->get_temp_image(). These URLs are used in <img> tags $icons->$icons->as you would expect. If you want the more complex setup with forms for choosing countries, languages etc, then take another look at index.php. It collects output in the $output variable and finally prints it out when everything's ready. You'll probably want to skip the first part that adds to $output and then adjust the part that starts after if (!empty($icao)). > When i run the test page, everything works just fine. Great, then we know that PhpWeather works at your site. > I am very new to php, so try to keep it simple :-) -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |
From: Martin G. <gim...@gi...> - 2003-04-16 18:29:59
|
"Jake Ortman" <ja...@or...> writes: > OK, I know I discussed this before, but the output wasn't as good as I > would've liked, mostly because the data sucked. > > Anyway, we'll try this again. I can get access to a "metar.txt" file > from a local weather station that contains the following: > > "METAR SNRV 072215Z AUTO 18308KT 13/01 A3016 RMK A02 SLP212 NOSPECI P0000 > T01310015" Great, that should be enough. > Any ideas? I'm not a wonderful PHP programmer by any means, and it > was probably a fluke I got the print_table to work for me to begin > with :). Hehe, I don't think this should be that difficult :-) Since your file contains just the one METAR for your local airport, then I think the easiest way would be to change get_metar_file() in data_retrieval.php to this function get_metar_file($icao) { if ($icao == 'SNRV') { return file('full/pathname/to/your/metar.txt'); } else { $host = 'weather.noaa.gov'; $location = "/pub/data/observations/metar/stations/$icao.TXT"; return @file('http://' . $host . $location); } } That should implement an override so that the METAR for SNRV will be fetched from the local file somewhere on your filesystem, and the rest will still be fetched from the NWS. The rest of the logic with caching should still work, as far as I can see... -- 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. Join Freenet: http://gimpster.com/downloads/freenet/ |