Cannot get more than 15 rows from Arrived function

Hi,

I am having trouble getting more than 15 records out of the arrived function. I am using a PHP script to query for all flights for a given airport ID but get 15 no matter what value I set the howMany parameter to. I tried running a script with the max result size function but it doesn’t seem to change anything.Any help would be appreciated.

PHP code I am using below:

SetMaximumResultSize script:


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

$params = array("max_size" => 1000);

$result = $client->SetMaximumResultSize($params);

Arrived Script:


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

	$params = array("airport" => $airportId, "howMany" => 100, "filter" => NULL, "offset" => 0);

	$result = $client->Arrived($params);

Our database records for your user indicates that the SetMaximumResultSize call is apparently not succeeding since it is still set to the default limit, but your sample code for that looks like it should be correct.

Have you tried printing out the $result from that invocation? It should return “0” on success.

It might also help if you set “exceptions” to 1 in the $options array so that you can see if an error is being returned by the server.

Thanks for your reply. It looks like I am getting an “Authorization Required” error back from the server. Does this have something to do with my FlightAware credentials?

The error message returned:


PHP Fatal error:  Uncaught SoapFault exception: [HTTP] Authorization Required in (my script location):13

Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://flightxm...', 'FlightXML2:SetM...', 1, 0)
#1 (my script location)(13): SoapClient->__call('SetMaximumResul...', Array)
#2 (my script location)(13): SoapClient->SetMaximumResultSize(Array)
#3 {main}
  thrown in (my script location) on line 13

Your account appears to currently have 2 different FlightXML API keys on your account, one if which is an expired trial key but the other one is valid. Be sure that both of your scripts are using your current key. Is the authorization failure happening when using the current key? flightaware.com/commercial/flightxml/key

I reran the arrived code using the valid ID and it looks like it works now but I need to do further testing. We have had the new key since 10/20 but I was able to pull data for more than 15 rows up until about two weeks ago depending on which airport I queried.

Is there any way we can get access to past Arrived data for a list of airports? The Arrived function only works for the past 24 hours right?

I can confirm that at least one of your calls to SetMaximumResultSize 1000 had succeeded.

Arrived only allow a limited time period (I think 24 hours is indeed correct), and unfortunately there is no provision for accessing older data. If you need to obtain some historical data, you can contact our custom reports team for a quote. flightaware.com/commercial/customreports

Ok great thanks. Everything looks like its working now.