Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "sample";
- $password = "password";
- $zipcode = "90210";
- $url = "https://api.zip2tax.com/TaxRate-USA.xml?username=" . $username . "&password=" . $password . "&zip=" . $zipcode;
- $curl = curl_init($url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- $curl_response = curl_exec($curl);
- /*echo $curl_response;*/
- curl_close($curl);
- $curl_response = str_replace("utf-16","utf-8",$curl_response);
- $doc = new DOMDocument();
- $doc->loadXML($curl_response);
- echo $doc->errorInfo->errorMessage[0];
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement