# PHP Questions

**URL:** <https://discussions.flightaware.com/t/php-questions/3922>\
**Category:** AeroAPI\
**Created:** [September 22, 2007, 7:24pm UTC](https://discussions.flightaware.com/t/php-questions/3922 "2007-09-22T19:24:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![testaj](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@testaj](https://discussions.flightaware.com/u/testaj)\
**Post date:** [September 22, 2007, 7:24pm UTC](https://discussions.flightaware.com/t/php-questions/3922/1 "2007-09-22T19:24:45Z")

</div>

I’m fairly new to SOAP and I’m getting an error and I’m not sure what I’m doing wrong. I’m using the following code to try and get the flight information.

```auto

$DirectFlight_Authentication = array(
                'user' => 'testaj',
                'pass' => 'dontpostyourpassword',
        );
 
	$wsdl_url = 'http://flightaware.com/commercial/flightxml/data/wsdl1.xml';

$client = new SoapClient($wsdl_url, $DirectFlight_Authentication);
print($client->Flightinfo("GLA122", 1));

```

I’m getting this error:

> Fatal error: Uncaught SoapFault exception: [HTTP] Authorization Required in /home/jtesta/public\_html/flightxml/test3.php:26 Stack trace: #0 [internal function]: SoapClient-\>\_\_doRequest(‘\<?xml version="…’, ‘[http://directfl](http://directfl)…’, ‘FlightAwareDire…’, 1, 0) #1 [internal function]: SoapClient-\>\_\_call(‘Flightinfo’, Array) #2 /home/jtesta/public\_html/flightxml/test3.php(26): SoapClient-\>Flightinfo(‘GLA122’, 1) #3 {main} thrown in /home/jtesta/public\_html/flightxml/test3.php on line 26

How is the authorization kept? or am I screwing this up royally somehow!?!?!
