Created
September 10, 2011 19:33
-
-
Save ajsouza/1208683 to your computer and use it in GitHub Desktop.
Simple SOAP call for OAS API (AdXML)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OASAPI{ | |
private $wsdl; | |
function __construct($url){ | |
$this->wsdl = $url; | |
} | |
function request($account, $user, $pass, $adxml){ | |
try{ | |
$client = new SoapClient($this->wsdl, array( 'connection_timeout' => 120, 'max_execution_time' => 120)); | |
$return = $client->OASXmlRequest($account, $user, $pass, $adxml); | |
//--> Test for valid AdXML Return | |
return $return; | |
} | |
catch (Exception $e){ | |
echo $e->getMessage(); | |
return false; | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment