Re: Help
Brought to you by:
iridium
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. |