Example #1
0
 if ($rows['lot_size'] <= 0 || $rows['lot_size'] == "") {
     $rows['lot_size'] = $lot_size;
 }
 if ($rows['stories'] <= 0 || $rows['stories'] == "") {
     $rows['stories'] = $stories;
 }
 if ($rows['year_built'] <= 0 || $rows['year_built'] == "") {
     $rows['year_built'] = $year_built;
 }
 if ($rows['distance'] < 0 || $rows['distance'] == "") {
     continue;
 }
 if ($rows['dateSold'] == "") {
     continue;
 }
 $rows['propertyType'] = getPropertyTypeDLP($rows['propertyType']);
 /*
 					if(($rows['sq_size'] > $C1Rangesqrft['Min'] && $rows['sq_size'] < $C1Rangesqrft['Max'] ) && ($rows['lot_size]'] > $C1Rangelot['Min'] && $rows['lot_size]'] < $C1Rangelot['Max']) && ($rows['year_built'] > $C1RangeAge['Min'] && $rows['year_built'] < $C1RangeAge['Max']) && ($ydate> $cn1) && $rows['distance']<$C1Proximity)
 					{
 						$c1[] = array('address'=>$rows['address'], 'distance'=>$rows['distance'],'bedsBaths'=>$rows['beds'] ,'sq_size'=>$rows['sq_size'],'year_built'=>$rows['year_built'],'lot_size'=>$rows['lot_size'],'stories'=>$rows['stories'],'dateSold'=>$rows['dateSold'], 'amount'=>$rows['amount'], 'latitude'=>$coords['latitude'], 'longitude'=>$coords['longitude']);
 					}
 					else 
 					if(($rows['sq_size'] > $C2Rangesqrft['Min'] && $rows['sq_size'] < $C2Rangesqrft['Max'] ) && ($rows['lot_size'] > $C2Rangelot['Min'] && $rows['lot_size'] < $C2Rangelot['Max']) && ($rows['year_built'] > $C2RangeAge['Min'] && $rows['year_built'] < $C2RangeAge['Max']) && ($ydate> $cn2) && $rows['distance']<$C2Proximity)
 					{
 						$c2[] = array('address'=>$rows['address'], 'distance'=>$rows['distance'],'bedsBaths'=>$rows['beds'] ,'sq_size'=>$rows['sq_size'],'year_built'=>$rows['year_built'],'lot_size'=>$rows['lot_size'],'stories'=>$rows['stories'],'dateSold'=>$rows['dateSold'], 'amount'=>$rows['amount'], 'latitude'=>$coords['latitude'], 'longitude'=>$coords['longitude']);
 					}else */
 if ($rows['sq_size'] >= $C3Rangesqrft['Min'] && $rows['sq_size'] <= $C3Rangesqrft['Max'] && ($rows['lot_size'] >= $C3Rangelot['Min'] && $rows['lot_size'] <= $C3Rangelot['Max']) && ($rows['year_built'] >= $C3RangeAge['Min'] && $rows['year_built'] <= $C3RangeAge['Max']) && $rows['distance'] <= $C3Proximity && $rows['stories'] == $stories && $rows['propertyType'] == $propertyType) {
     $rows['dateSold'] = preg_replace("@T.*?\$@", "", $rows['dateSold']);
     list($y, $m, $d) = preg_split("@-@", $rows['dateSold']);
     $rows['dateSold'] = $m . "/" . $d . "/" . $y;
     $c3[] = array('address' => $rows['address'], 'distance' => $rows['distance'], 'bedsBaths' => $rows['beds'], 'sq_size' => $rows['sq_size'], 'year_built' => $rows['year_built'], 'lot_size' => $rows['lot_size'], 'stories' => $rows['stories'], 'dateSold' => $rows['dateSold'], 'amount' => $rows['amount'], 'latitude' => $rows['latitude'], 'longitude' => $rows['longitude'], 'pool' => $rows['pool'], 'basement' => $rows['basement'], 'criteria' => '3', 'criteria3' => 'cr3', 'propertyType' => $rows['propertyType']);
Example #2
0
				url: "home.php?page="+currentPage+"&set_page=index",
				success: function(data){	
					$("#pageContent").html(data);
					$('.nav-stacked li').removeClass('active')
					$(".nav-stacked li:first").addClass("active");
				}
		});

	</script>
	<?php 
        exit;
    }
    unset($_SESSION['trackerror']);
    $PropData['TOTALBATHROOMCOUNT'] = round($PropData['TOTALBATHROOMCOUNT']);
    $pType = $PropData['STANDARDUSECODE_EXT'];
    $propertyType = getPropertyTypeDLP($PropData['STANDARDUSECODE_EXT']);
    $city = $PropData['_CITY'];
    $state = $PropData['_STATE'];
    $zip = $PropData['_POSTALCODE'];
    $PropData['_STREETADDRESS'] = trim($PropData['_STREETADDRESS']);
    $street = $PropData['_HOUSENUMBERFRACTION_EXT'] . " " . $PropData['_HOUSENUMBER'] . " " . $PropData['_DIRECTIONSUFFIX'] . " " . $PropData['_STREETNAME'] . " " . $PropData['_STREETSUFFIX'] . " " . $PropData['_APARTMENTORUNITPREFIX_EXT'] . " " . $PropData['_APARTMENTORUNIT'];
    $street = trim($street);
    $Add = $street . ' ' . $PropData['_CITY'] . ' ' . $PropData['_STATE'] . ' ' . $PropData['_POSTALCODE'];
    $sq_footage = round($PropData['GROSSLIVINGAREASQUAREFEETCOUNT']);
    $org_footage = round($PropData['GROSSLIVINGAREASQUAREFEETCOUNT']);
    $bedrooms = round($PropData['TOTALBEDROOMCOUNT']);
    $bathrooms = round($PropData['TOTALBATHROOMCOUNT']);
    $year_built = $PropData['PROPERTYSTRUCTUREBUILTYEAR'];
    $lot_size = round($PropData['LOTSIZESQUAREFEETCOUNT_EXT']);
    $stories = round($PropData['STORIESCOUNT']);
    $sq_f = "+/- 20%";
Example #3
0
function get_xml_data_address($arrParam)
{
    $url = 'http://dlpapi.realtytrac.com/Reports/Get?ApiKey=a2d3e2aa-9c9b-4aab-af3a-56785ae67e25&Login=accurity&Password=1cyquent!&JobID=&LoanNumber=&PreparedBy=&ResellerID=&PreparedFor=&OwnerFirstName=&OwnerLastName=&AddressType=&PropertyStreetAddress=' . $arrParam['street'] . '&AddressNumber=&StartAddressNumberRange=&EndAddressNumberRange=&StreetDir=&StreetName=&StreetSuffix=&City=' . $arrParam['city'] . '&StateCode=' . $arrParam['state'] . '&County=&ZipCode=&PropertyParcelID=&SAPropertyID=&APN=&ApnRangeStart=&ApnRangeEnd=&GeoCodeX=&GeoCodeY=&GeoCodeRadius=&SearchType=&NumberOfRecords=&Format=XML&ReportID=104&R104_SettingsMode=';
    $path = $_SESSION['path'];
    $fp = fopen($path, "a");
    fwrite($fp, "<p>Query To Get Comparable Property - <b> " . $url . "</b></p>");
    fclose($fp);
    $curl = curl_init();
    curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url));
    $resp = curl_exec($curl);
    curl_close($curl);
    preg_match_all("@<PROPERTY>(.*?)</PROPERTY>@is", $resp, $aProp, PREG_SET_ORDER);
    $result = array();
    foreach ($aProp as $arr) {
        preg_match("@_City=\"(.*?)\"\\s*_StreetAddress=\"(.*?)\"\\s*_State=\"(.*?)\"\\s*_PostalCode=\"(.*?)\"@is", $arr[1], $matches);
        $address = $matches[2] . " " . $matches[1] . " " . $matches[3] . " " . $matches[4];
        preg_match("@DistanceFromSubjectPropertyMilesCount=\"(.*?)\"@is", $arr[1], $distance);
        preg_match("@TotalBedroomCount=\"(.*?)\"@is", $arr[1], $beds);
        preg_match("@TotalBathroomCount=\"(.*?)\"@is", $arr[1], $baths);
        preg_match("@GrossLivingAreaSquareFeetCount=\"(.*?)\"@is", $arr[1], $size);
        preg_match("@PropertyStructureBuiltYear=\"(.*?)\"@is", $arr[1], $built);
        preg_match("@LotSquareFeetCount=\"(.*?)\"@is", $arr[1], $lot);
        preg_match("@StoriesCount=\"(.*?)\"@is", $arr[1], $story);
        preg_match("@LatitudeNumber=\"(.*?)\"\\s*LongitudeNumber=\"(.*?)\"@is", $arr[1], $coords);
        if (preg_match("@PropertySalesDate@", $arr[1])) {
            preg_match("@PropertySalesDate=\"(.*?)\"@is", $arr[1], $sale_date);
        } else {
            preg_match("@SALES_HISTORY.*?TransferDate_ext=\"(.*?)\"@is", $arr[1], $sale_date);
        }
        preg_match("@SALES_HISTORY.*?PropertySalesAmount=\"(.*?)\"@is", $arr[1], $sale_amount);
        preg_match("@AMENITY _Type=\"Pool\" _ExistsIndicator=\"(.*?)\"@is", $arr[1], $pool);
        if ($pool[1] == "") {
            $pool[1] = "N";
        }
        preg_match("@BASEMENT SquareFeetCount=\"(.*?)\"@is", $arr[1], $basement);
        if ($basement[1] > 0) {
            $basement[1] = "Y";
        } else {
            $basement[1] = "No";
        }
        if ($coords[1] != "") {
            $latitude = $coords[1];
        }
        if ($coords[2] != "") {
            $longitude = $coords[2];
        }
        preg_match("@TransferDate_ext=\"(.*?)\"@is", $arr[1], $transfer);
        $transfer[1] = preg_replace("@T.*?\$@is", "", $transfer[1]);
        preg_match("@StoriesCount=\"(.*?)\"@is", $arr[1], $stories);
        $stories = $stories[1];
        preg_match("@StandardUseCode_ext=\"(.*?)\"@", $arr[1], $props);
        $ptype = trim($props[1]);
        $ptype = getPropertyTypeDLP($ptype);
        if ($basement[1] == "Yes") {
            $basement[1] = "Y";
        } else {
            if ($basement[1] == "No") {
                $basement[1] = "N";
            }
        }
        $result[] = array('address' => $address, 'distance' => $distance[1], 'beds' => floor($beds[1]) . ' /' . floor($baths[1]) . ' ', 'sq_size' => $size[1], 'year_built' => $built[1], 'lot_size' => $lot[1], 'stories' => $story[1], 'dateSold' => $sale_date[1], 'amount' => $sale_amount[1], 'street' => $matches[2], 'city' => $matches[1], 'state' => $matches[3], 'zip' => $matches[4], 'latitude' => $latitude, 'longitude' => $longitude, 'pool' => $pool[1], 'basement' => $basement[1], 'transferDate' => $transfer[1], 'stories' => $stories, 'propertyType' => $ptype);
    }
    return $result;
}