getting flight details for flight number

Hi,

I am very new here, I apology if I am miss understood this.

I want to pull the flight details by providing flight number, i.e., ek07.

like if we go here flightaware.com and provide the flight # and it pulls the results.

Is it possible?

Thanks in advance.

Kind Regards,
Kamran

I am getting the result if I provide “SWA2558”, but if I provide “ek07” I am getting the same issue. :frowning:

$options = array(
‘trace’ => true,
‘exceptions’ => 0,
‘login’ => ‘rzirvi’,
‘password’ => ‘29c20140e3845a2581f85376aa207c79e6a995b2’,
);

$client = new SoapClient(‘http://flightxml.flightaware.com/soap/FlightXML2/wsdl’, $options);

$params = array(
“ident” => “SWA2558”,
“howMany” => 1,
“offset” => 0 );

$result = $client->FlightInfoEx($params);
echo ‘

’;
print_r($result);

You will want to try to use ICAO identifiers for the flight when possible. Although FlightXML can sometimes automatically convert the identifiers for you, if will refuse to do so when there is a possible ambiguity that may cause an unexpected flight to be returned. Our website uses slightly more aggressive logic to convert identifiers because we know that a user is viewing the resulting match, rather than just an app accessing our API.

In your example, the correct identifier should be UAE7, instead of EK07.

In your example, the correct identifier should be UAE7, instead of EK07.

Hi bovineone,

Thank you for reply,

I have tried identifier UAE7 instead of flight number EK07 and it works, problem is we are asking the users to enter the flight number to get the flight details and we never know which flight number user is going to enter. is there any thing in the method or way to know that which identifier is required to use for a flight number?

I also also want to get the terminal as well, but FlightInfoEx give me details about the estimatedarrivaltime, originCity, destinationCity etc but not the terminal.

I hope I am conveying my concern?

Kind Regard,

Your application should do basic validation, sanitizing, and conversion of user entries before blindly passing them to our API.

To get terminal and gate information, you must call the “AirlineFlightInfo” API with the faFlightID of the specific flight you are interested in.

thank you for reply, what should I need to call to get faFlightID

My bad faFlightID was in FlightInfoEx.

Thankyou