CVS: phpweather-1.x demo.php,1.1.1.1,1.2
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-04-19 18:09:59
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv3606 Modified Files: demo.php Log Message: Various updates, nothing major... Index: demo.php =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/demo.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -3 -r1.1.1.1 -r1.2 --- demo.php 7 Mar 2002 09:49:11 -0000 1.1.1.1 +++ demo.php 19 Apr 2002 18:09:56 -0000 1.2 @@ -1,6 +1,6 @@ <html> <head> - <title>PHP Weather</title> + <title>PHP Weather Demonstration</title> </head> <body> @@ -36,17 +36,17 @@ <h1>Your version: <? echo $version ?></h1> -<p>Your source was last modified at <b><? echo $last_modified ?> - UTC</b>. Click <a -href="http://sourceforge.net/projects/phpweather/">here</a> to -download the newest version from <a +<p>Your source was last modified on <b><? echo $last_modified ?></b>. +Click <a href="http://sourceforge.net/projects/phpweather/">here</a> +to download the newest version from <a href="http://www.sourceforge.net/">SourceForge</a>. I'm currently working on the next version of <a href="http://www.sourceforge.net/projects/phpweather/">PHP Weather</a>. You can try it by downloading a snapshot of CVS, but as I don't make these all the time, the best way to follow the development is to check it out of CVS. It's all explained on the <a -href="http://www.sourceforge.net/">SourceForge</a> page.</p> +href="http://www.sourceforge.net/projects/phpweather/">SourceForge</a> +page.</p> <p>If you are having problems with <a href="http://sourceforge.net/projects/phpweather/">PHP Weather</a>, @@ -57,20 +57,19 @@ href="http://lists.sourceforge.net/lists/listinfo/phpweather-devel">this page</a>.</p> -To help speed up the development, you should take a look at the -latest code from CVS. Try and see if you can figure out what is -happening in there, and then tell me what you think. Or even better: -create a user-account at <a -href="http://www.sourceforge.net/">SourceForge</a>, and mail me the -username. I'll then add you to the project, so that we can change the -code yourself.</p> +To help speed up the development, you should take a look at the latest +code from CVS. Try and see if you can figure out what is happening in +there, and then tell me what you think. Or even better: create a +user-account at <a href="http://www.sourceforge.net/">SourceForge</a>, +and mail me the username. I'll then add you to the project, so that +you can help by changing the code yourself.</p> <h1>A sample METAR-report</h1> -<p>The report below is the latest from Aalborg, Denmark (this is where -I live). The raw METAR looks this way:</p> +<p>The report below is the latest from Tirstrup, Denmark (this is +where I live). The raw METAR looks this way:</p> -<?php $metar = get_metar('EKYT'); ?> +<?php $metar = get_metar('EKAH'); ?> <blockquote><code><? echo $metar ?></code></blockquote> @@ -78,8 +77,8 @@ href="http://sourceforge.net/projects/phpweather/">PHP Weather</a> you could also present the information like this:</p> -<? -pretty_print_metar($metar, 'Aalborg, Denmark') +<?php +pretty_print_metar($metar, 'Tirstrup, Denmark') ?> <p>Here is the same piece of text with the current weather in @@ -90,7 +89,7 @@ <p>and then the pretty-printed output:</p> -<? +<?php include('locale_es.inc'); pretty_print_metar($metar, 'Honolulu, Hawaii'); ?> @@ -99,7 +98,7 @@ identifier of the weather station, and the include-file with the strings used by <a href="http://sourceforge.net/projects/phpweather/">PHP Weather</a>. -The identifier for Aalborg, Denmark is <code>EKYT</code> and the one +The identifier for Tirstrup, Denmark is <code>EKAH</code> and the one for Honolulu, Hawaii is <code>PHNL</code>.</p> <p>Try it out for yourself - choose a city and a language from the @@ -201,11 +200,11 @@ </code> <p>That's it! The above code will tell you what the temperature is in -Aalborg, Denmark. To make the examples above I've made a function +Tirstrup, Denmark. To make the examples above I've made a function called <code>pretty_print_metar()</code>. You use it like this:</p> <code><font color="#000000"> -<font color="#0000BB"><?php<br>$metar </font><font color="#007700">= </font><font color="#0000BB">get_metar</font><font color="#007700">(</font><font color="#DD0000">'EKYT'</font><font color="#007700">);<br></font><font color="#0000BB">pretty_print_metar</font><font color="#007700">(</font><font color="#0000BB">$metar</font><font color="#007700">, </font><font color="#DD0000">'Aalborg, Denmark'</font><font color="#007700">);<br></font><font color="#0000BB">?><br></font> +<font color="#0000BB"><?php<br>$metar </font><font color="#007700">= </font><font color="#0000BB">get_metar</font><font color="#007700">(</font><font color="#DD0000">'EKYT'</font><font color="#007700">);<br></font><font color="#0000BB">pretty_print_metar</font><font color="#007700">(</font><font color="#0000BB">$metar</font><font color="#007700">, </font><font color="#DD0000">'Tirstrup, Denmark'</font><font color="#007700">);<br></font><font color="#0000BB">?><br></font> </font> </code> @@ -325,11 +324,11 @@ the same directory as <code>phpweather.inc</code> and then point your <a href="http://www.wapforum.org/">WAP</a>-browser on your mobile phone to the page. It should then show you the current weather in -Aalborg, Denmark.</p> <p>The format used in the +Tirstrup, Denmark.</p> <p>The format used in the <code>wap.php</code>-page is a smaller and more compact format than the one shown on this page. It looks like this:</p> -<pre><? pretty_print_metar_wap(get_metar('EKYT'), 'Aalborg'); ?></pre> +<pre><? pretty_print_metar_wap(get_metar('EKYT'), 'Tirstrup'); ?></pre> <h1>Related information</h1> |