AirlineFlightSchedules


#1

Hi,

I cannot get results from AirlineFlightSchedules.

The réponse I get is “stdClass Object ( [AirlineFlightSchedulesResult] => stdClass Object ( [next_offset] => -1 ) )”

Here is my Code. Login and pw are fine(blanked in the email only). The script seems fine, and works with other operations. I receive no errors, but don’t get the flights.

<?php $options = array( 'trace' => true, 'exceptions' => 0, 'login' => ‘*****', 'password' => ‘******', ); $client = new SoapClient('http://flightxml.flightaware.com/soap/FlightXML2/wsdl';, $options); // get the flight. $params = array( “startDate” => "1409565600", "endDate" => "1409608800", "origin" => "kjfk", "destination" => "klax", "airline" => "", "flightno" => "", "howMany" => "15", "offset" => "0" ); $result = $client->FleetScheduled($params); print_r($result); ?>

#2

The airport codes for origin and destination need to be in all caps. Try this for your options array:


$params = array(
	"startDate" => 1409565600,
	"endDate" => 1409608800,
	"origin" => "KJFK",
	"destination" => "KLAX",
	"airline" => "",
	"flightno" => "",
	"howMany" => 15,
	"offset" => 0
);


#3

That was it.

Thank You