- header: documentation ( source)
<?php
/* http://sourceforge.net/projects/nusoap/ */
require('../includes/nusoap/nusoap.php');
$parameters = array('product' => 'glance',
'numDays' => 5,
'format' => '24 hourly',
'latitude' => 41.879535,
'longitude' => -87.624333);
try
{
/* create the nuSOAP object */
$c = new nusoap_client('http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl', 'wsdl');
/* make the request */
$result = $c->call('NDFDgen', $parameters);
}
catch (Exception $ex)
{
/* nuSOAP throws an exception is there was a problem fetching the data */
echo 'failed';
}
header('Content-type: text/xml');
echo $result;
/* ?> */