Skip to content

Address lookup

You can use the function ‘taxQuery’ to get an array of suggested tax names for the employee:

<?php
include('taxes.php');
$work = "123 Main St, Anytown, NY 12345";
$home = "456 Elm St, Othertown, NY 12345";
$a = taxQuery($work, $home, "https://localhost:8443");
foreach ($a as $taxname){
$tax = $taxlist[$taxname];
$withheld = $tax->withheld ? 'yes' : 'no';
print "name: $tax->name
withheld: $withheld
type: $tax->type
<hr>";
}
?>

Note In order to use the taxQuery function, you’ll need a running TaxQuery container:

Terminal window
docker run -p 8443:8443 calibertechnology/taxquery

The -p 8443:8443 argument tells the image to listen for an https connection on port 8443. For more information see the TaxQuery page on the Docker hub.

Note Federal, FUTA, and Social Security taxes apply regardless of location, and are not returned by taxQuery().