{"id":208,"date":"2022-10-04T18:52:57","date_gmt":"2022-10-04T18:52:57","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?post_type=serviceobjects&#038;p=208"},"modified":"2025-08-22T10:45:01","modified_gmt":"2025-08-22T17:45:01","slug":"avp-sample-code-snippets","status":"publish","type":"page","link":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/","title":{"rendered":"AVP Sample Code Snippets"},"content":{"rendered":"<section aria-labelledby=\"sec-address-validation-plus-us-code-snippets\">\n<article aria-label=\"Section heading: Address Validation Plus - US Code Snippets\" class=\"has-medium-font-size\">\n<h4 id=\"sec-address-validation-plus-us-code-snippets\" class=\"has-medium-font-size\">Address Validation Plus &#8211; US Code Snippets<\/h4>\n<\/article>\n<article aria-label=\"Overview and sample code page link\">\n    The following section is designed for developers looking to integrate our DOTS Address Validation Plus &#8211; US service into their applications or websites. &nbsp;Code snippets are designed to give a quick look at how to make the call and collect the result. &nbsp;They are not complete solutions, but helpful for developers that just need a basic starting point. &nbsp;We will continue to add new snippets of different languages to this list from time to time. &nbsp;For sample code in additional languages or more complete example applications please visit our website sample code page:&nbsp;<a href=\"\/developers\/sample-code\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.serviceobjects.com\/developers\/sample-code\/<\/a>.<br \/>\n  <\/article>\n<p>  &nbsp;<\/p>\n<\/section>\n<section aria-labelledby=\"sec-address-validation-plus-php-snippet\">\n<article aria-label=\"Section heading: Address Validation Plus Code Snippet using PHP\" class=\"has-medium-font-size\">\n<h4 id=\"sec-address-validation-plus-php-snippet\" class=\"has-medium-font-size\">Address Validation Plus Code Snippet using PHP<\/h4>\n<\/article>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ (Optional) This turns off the WSDL caching, which is on by default.\r\nini_set(\"soap.wsdl_cache_enabled\",\"0\");\r\n \r\n\/\/ Set these values per web service &lt;as needed>\r\n$wsdlUrl = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\";\r\n \r\n\/\/ Create the SoapClient and pass the URL to the WSDL file and optional parameters as needed\r\n\/\/$soapClient = new SoapClient($wsdlUrl, array(\"trace\" => true, \"exceptions\" => false,));\r\n$soapClient = new SoapClient($wsdlUrl);\r\n \r\n\/\/ If GET information exists, insert into variables\r\n $Address = $_GET['Address'];\r\n $Address2 = $_GET['Address2'];\r\n $City = $_GET['City'];\r\n $State = $_GET['State'];\r\n $Zip = $_GET['Zip'];\r\n \r\n\/\/ http get of the key\r\nif(isset($_GET['LicenseKey']))\r\n $LicenseKey = $_GET['LicenseKey'];\r\n \r\n\/\/ Variable to tell if the form was submitted\r\nif(isset($_GET['Action']))\r\n $Action = $_GET[\"Action\"];<\/pre>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Address Validation Plus &#8211; US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus &#8211; US service into their applications or websites. &nbsp;Code snippets are designed to give a quick look at how to make the call and collect the result. &nbsp;They are not complete solutions, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2342,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-208","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AVP Sample Code Snippets<\/title>\n<meta name=\"description\" content=\"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AVP Sample Code Snippets\" \/>\n<meta property=\"og:description\" content=\"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-22T17:45:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/\",\"url\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/\",\"name\":\"AVP Sample Code Snippets\",\"isPartOf\":{\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-10-04T18:52:57+00:00\",\"dateModified\":\"2025-08-22T17:45:01+00:00\",\"description\":\"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US\",\"breadcrumb\":{\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Legacy\",\"item\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DOTS Address Validation Plus &#8211; US\",\"item\":\"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"AVP Sample Code Snippets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#website\",\"url\":\"https:\/\/www.serviceobjects.com\/docs\/\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.serviceobjects.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#organization\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"url\":\"https:\/\/www.serviceobjects.com\/docs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"contentUrl\":\"https:\/\/www.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"width\":2560,\"height\":1440,\"caption\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\"},\"image\":{\"@id\":\"https:\/\/www.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AVP Sample Code Snippets","description":"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/","og_locale":"en_US","og_type":"article","og_title":"AVP Sample Code Snippets","og_description":"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US","og_url":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2025-08-22T17:45:01+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/","url":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/","name":"AVP Sample Code Snippets","isPartOf":{"@id":"https:\/\/www.serviceobjects.com\/docs\/#website"},"datePublished":"2022-10-04T18:52:57+00:00","dateModified":"2025-08-22T17:45:01+00:00","description":"Address Validation Plus - US Code Snippets The following section is designed for developers looking to integrate our DOTS Address Validation Plus - US","breadcrumb":{"@id":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/avp-sample-code-snippets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"Legacy","item":"https:\/\/www.serviceobjects.com\/docs\/legacy\/"},{"@type":"ListItem","position":3,"name":"DOTS Address Validation Plus &#8211; US","item":"https:\/\/www.serviceobjects.com\/docs\/legacy\/dots-address-validation-plus-us\/"},{"@type":"ListItem","position":4,"name":"AVP Sample Code Snippets"}]},{"@type":"WebSite","@id":"https:\/\/www.serviceobjects.com\/docs\/#website","url":"https:\/\/www.serviceobjects.com\/docs\/","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","description":"","publisher":{"@id":"https:\/\/www.serviceobjects.com\/docs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.serviceobjects.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.serviceobjects.com\/docs\/#organization","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","url":"https:\/\/www.serviceobjects.com\/docs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.serviceobjects.com\/docs\/#\/schema\/logo\/image\/","url":"https:\/\/www.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","contentUrl":"https:\/\/www.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","width":2560,"height":1440,"caption":"Service Objects | Contact, Phone, Email Verification | Data Quality Services"},"image":{"@id":"https:\/\/www.serviceobjects.com\/docs\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":26,"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/208\/revisions"}],"predecessor-version":[{"id":11946,"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/208\/revisions\/11946"}],"up":[{"embeddable":true,"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2342"}],"wp:attachment":[{"href":"https:\/\/www.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}