server-webapi-code-11-nws.php / php
<?php require('../lib/nusoap.php'); client = new soapclient("http://weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl", true); today, 'numDays' => '2', 'format' => '24 hourly' ); client->call('NDFDgenByDay',error = error) { echo "error<pre>"; print_r(result); echo "</pre>"; exit; } result); weatherDates = array(); foreach(time) { time; time)); } xml->data->parameters->temperature[0]->value AS maxTemperature[] = (int) minTemperature = array(); foreach(minTemp) { minTemp; } xml->data->parameters->{'conditions-icon'}->{'icon-link'} as icons[] = (string) <table>\n<tr>"; day = 0; while(isset(day])) { echo "<th colspan=\"2\">{day]}</th>"; </tr>"; echo "<tr>"; day = 0; while(isset(day])) { echo "<td><b>Low</b>: {day]} <br>"; echo "<b>High</b>:{day]}<br></td>"; echo "<td><img src=\"{day]}\" align=\"right\">\n\n<br></td>"; </tr></table>"; ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.