Homes & Property For Sale in Mayfair


Live listings of Homes and properties for sale in Mayfair

function get_string(&$data, $varname)
{
$start = strpos($data, $varname . '="') + strlen($varname . '="');
$end = strpos($data, '"', $start) - $start;
return substr($data, $start, $end);
}

// This will work just fine, and is done to ensure it's completely error-free.
//error_reporting(E_ALL);

$xml_source = "http://api.nestoria.co.uk/api?action=search_listings&encoding=xml&place_name=Mayfair&listing_type=buy&sort=newest&radius=1km&number_of_results=20&pretty=1";

$xml_file = file($xml_source);
while (list($line_index, $line_value) = each($xml_file)) {
if (preg_match("/

$lister_url = get_string($line_value, 'lister_url');
$property_type = get_string($line_value, 'property_type');
$price_formatted = get_string($line_value, 'price_formatted');
$lister_name = get_string($line_value, 'lister_name');
$summary = get_string($line_value, 'summary');
$title = get_string($line_value, 'title');
$thumb_url = get_string($line_value, 'thumb_url');
if(preg_match('/^house|flat/Ui',$title)) {
$full_title = ucwords($title);
} else {
$full_title = ucwords($property_type)." In ".ucwords($title);
}

?>

Powered by nestoria.co.uk