Skip to content

Instantly share code, notes, and snippets.

@ajsouza
Created September 10, 2011 19:33
Show Gist options
  • Save ajsouza/1208683 to your computer and use it in GitHub Desktop.
Save ajsouza/1208683 to your computer and use it in GitHub Desktop.
Simple SOAP call for OAS API (AdXML)
<?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