Use SOAPCLIENT API


#1

I use this code for AirlineFlightSchedules

$options = array(
‘trace’ => true,
‘exceptions’ => 0,
‘login’ => ‘user’,
‘password’ => ‘apikey’,
);
$client = new SoapClient(‘https://flightxml.flightaware.com/soap/FlightXML2/wsdl’, $options);

	// get the weather.
	$params = array(
		"startDate" 	=> 1499644800, 
		"endDate"   	=> 1499731199 ,
		"origin"    	=> "BVA",
		"destination"	=>"PSA"
		);
	$result = $client->Scheduled($params);

But return eror 500, what’s the problem?
thanks :neutral_face: :slight_smile:


#2

For the Scheduled method, the allowed query parameters are airport, filter, howMany, offset. So you’d need to change your query params to something like this:



$params = array(
"airport" => "KIAH", 
"howMany" => 25 ,
"offset" => 0
);