PAVv3 PHP w/cURL

From CDYNE Wiki
Jump to: navigation, search

Verify Address

<pre>
<?php
 
$param = array(
'FirmOrRecipient' => 'CDYNE'
,'PrimaryAddressLine' => '505 Independence Parkway'
,'SecondaryAddressLine' => 'Suite 300'
,'Urbanization' => ''
,'CityName' => 'Chesapeake'
,'State' => 'VA'
,'ZipCode' => '23320'
,'LicenseKey' => f01d89fd-5155-5455-5585-e84ab8de8591'
);
 
$queryString = http_build_query($param);
 
$url = '
http://pav3.cdyne.com/PavService.svc/VerifyAddress' . '?' . $queryString;
 
$ch = curl_init();
 
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_HTTPGET,true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Accept: application/json'));
 
$response = curl_exec($ch);
 
curl_close($ch);
 
$array = json_decode($response);
 
print_r($array);
 
?>
</pre>
Personal tools
Namespaces

Variants
Actions
Navigation
Tools

Trial Key