MetarEx / PHP


#1

Hello,

I got successfully the Metar (Raw) with the Metar function but I can’t get the data for MetarEx function even if I send the different params (see my code below);


$options = array(
                 'trace' => true,
                 'exceptions' => 0,
                 'login' => 'mylogin',
                 'password' => 'mypassword',
                 );
$client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl', $options);

// get the weather.
$params = array("airport" => "KAUS");
$params = array("startTime" => 0);
$params = array("howMany" => 1);
/params = array("offset" => 0);
$result = $client->MetarEx($params);

print_r($result);

What I am doing wrong?

thanks


#2

I think all of your arguments are getting overwritten:



$params = array("airport" => "KAUS", 
         "startTime" => 0,
         "howMany" => 1,
         "offset" => 0);



#3

Hi,

Thank you. You’re right this code was wrong since the item # 0 of the array was overwritten.

Thanks again
Best Regards
Ray