if(isset($_GET['pid'])){
$pid = $_GET['pid'];
$xmlR = "http://www.dezrez.com/DRApp/DotNetSites/WebEngine/property/Property.aspx?apikey=" . $api . "&EAID=" . $eaid . "&XSLT=-1&pid=".$pid;
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $xmlR);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, false);
$xml = curl_exec($ch);
$xml = simplexml_load_string($xml);
//Uncomment to get XML URL
//echo $xmlR;
$hasfp = false;
$hasepc = false;
$brocLink;
$imgs = '';
foreach ($xml->propertyFullDetails->property->media->picture as $img)
{
if($img->attributes()->category == 'primary') {
$primary = $img . "&width=1000";
}
if($img->attributes()->category == 'primary' || $img->attributes()->category == 'secondary')
{
$imgs .= '

';
}
if($img->attributes()->category == 'floorplan')
{
$hasfp = true;
if($img->attributes()->id == "metropixID") {
$mp = true;
$fp = $img;
} else {
$mp = false;
$fp = $img . "&width=1000";
}
}
if($img->attributes()->category == 'EER')
{
$hasepc = true;
$epc = $img;
}
}
foreach ($xml->propertyFullDetails->property->text->description as $desc)
{
if($desc->attributes()->id == 1) {
$desc1 = $desc;
}
if($desc->attributes()->id == 2) {
$desc2 = $desc;
}
if($desc->attributes()->id == 3) {
$desc3 = $desc;
}
if($desc->attributes()->id == 4) {
$desc4 = $desc;
}
if($desc->attributes()->id == 5) {
$desc5 = $desc;
}
if($desc->attributes()->id == 6) {
$desc6 = $desc;
}
}
}?>
Warning: Invalid argument supplied for foreach() in
/vhost/vhost16/v/i/c/vickery.co.uk/www/inc/php/property-details.php on line
2