-
-
Save c6fc/6082807 to your computer and use it in GitHub Desktop.
Boulder County Assessor PHP>WSDL Interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'DataServiceImplemention.php'; //(sic) | |
$data = new DataServiceImplemention(); //(sic) | |
$assessment = new assessmentDetailedTab; | |
$account = 'R0043149'; | |
$assessment->accountNo = $account; | |
var_dump($data->assessmentDetailedTab($assessment)); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'DataServiceImplemention.php'; | |
function searchAddress($address) { | |
$data = new DataServiceImplemention(); | |
$search = new PropertySearch; | |
$property = new Property; | |
$property->Address = $address; | |
$search->property = $property; | |
return $data->propertySearch($search); | |
} | |
function getAssessment($account) { | |
$data = new DataServiceImplemention(); | |
$assessment = new assessmentDetailedTab; | |
# $account = 'R0043149'; | |
$assessment->accountNo = $account; | |
return $data->assessmentDetailedTab($assessment); | |
} | |
function getDetails($account) { | |
$data = new DataServiceImplemention(); | |
$assessment = new propertyDetailedTab(); | |
$assessment->acctNum = $account; | |
return $data->propertyDetailedTab($assessment); | |
} | |
function getAll($address) { | |
$badwords = array(); | |
$badwords[] = " apt "; | |
$badwords[] = " unit "; | |
$badwords[] = "#"; | |
$badwords[] = " lot "; | |
foreach ($badwords as $badword) { | |
if (stripos($address, $badword) !== false) { | |
echo "\r\n"; | |
echo "[" . $address . "] Address contains bad word: " . $badword; | |
echo "\r\n\r\n"; | |
return 0; | |
} | |
} | |
$results = searchAddress($address); | |
#var_dump($results); | |
$count = count($results->propertySearchResult->Property); | |
echo "\r\n"; | |
if ($count < 1) { | |
echo "No properties matched"; | |
return 0; | |
} | |
#echo $count . " properties matched:"; | |
if ($count == 1) { | |
$property = $results->propertySearchResult->Property; | |
} else { | |
$property = $results->propertySearchResult->Property[0]; | |
} | |
$ass = getAssessment(trim($property->AccountNo)); | |
$ass = $ass->assessmentDetailedTabResult; | |
$dets = getDetails(trim($property->AccountNo)); | |
$dets = $dets->propertyDetailedTabResult; | |
if (count($ass->Improvements) > 1) { | |
$imp = $ass->Improvements->Improvement[0]; | |
} else { | |
$imp = $ass->Improvements->Improvement; | |
} | |
$bang = (strtolower($address) == strtolower(trim($dets->MailAddress))) ? ' **Owner Occ!' : ''; | |
echo "[" . trim($property->AccountNo) . "] " . trim($property->Address) . $bang . "\r\n"; | |
echo ' - ' . trim($imp->Built) . ' ' . trim($imp->BedRooms) . '/' . trim($imp->FullBaths) . " --Worth: $" . number_format(trim($ass->TotalActual)) . "\r\n"; | |
echo ' - Owner: ' . trim($property->Owner) . ' (' . trim($dets->MailCity) . ', ' . trim($dets->MailState) . ")\r\n"; | |
echo ' - ## ' . trim($dets->MailAddress) . "\r\n"; | |
foreach ($ass->Deeds->string as $x => $deed) { | |
$deed = explode(';', $deed); | |
echo ' - [' . $deed[1] . ': $' . number_format($deed[2]) . "\r\n"; | |
} | |
echo "\r\n"; | |
return 1; | |
} | |
$limit = 200; $x = 0; | |
$handle = fopen('/home/brad/Downloads/28716-exports-14683-161.csv', 'r'); | |
while (($data = fgetcsv($handle, 0, ",")) !== false) { | |
$x++; | |
if ($x <= 50) { | |
continue; //skip header | |
} | |
#echo "Getting " . $data[0] . "\n"; | |
getAll(trim($data[0])) . "\n"; | |
sleep(2); | |
if ($x >= $limit) { | |
break; | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'DataServiceImplemention.php'; //(sic) | |
$data = new DataServiceImplemention(); //(sic) | |
$search = new PropertySearch; | |
$property = new Property; | |
$property->Address = '1100 Sumner St'; | |
$search->property = $property; | |
var_dump($data->propertySearch($search)); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://webpubapps.bouldercounty.org/services/DataService/webpubapps.bouldercounty.org.services.DataService.wsdl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment