Address Validation Plus – US Code Snippets

The following section is designed for developers looking to integrate our DOTS Address Validation Plus – US service into their applications or websites.  Code snippets are designed to give a quick look at how to make the call and collect the result.  They are not complete solutions, but helpful for developers that just need a basic starting point.  We will continue to add new snippets of different languages to this list from time to time.  For sample code in additional languages or more complete example applications please visit our website sample code page:

Address Validation Plus Code Snippet using PHP

// (Optional) This turns off the WSDL caching, which is on by default.
// Set these values per web service <as needed>
$wsdlUrl = "";
// Create the SoapClient and pass the URL to the WSDL file and optional parameters as needed
//$soapClient = new SoapClient($wsdlUrl, array("trace" => true, "exceptions" => false,));
$soapClient = new SoapClient($wsdlUrl);
// If GET information exists, insert into variables
 $Address = $_GET['Address'];
 $Address2 = $_GET['Address2'];
 $City = $_GET['City'];
 $State = $_GET['State'];
 $Zip = $_GET['Zip'];
// http get of the key
 $LicenseKey = $_GET['LicenseKey'];
// Variable to tell if the form was submitted
 $Action = $_GET["Action"];