I am using PHREST method for getting photo from MLS Server. I am not able to get images of property for that I am using below function.
if ($rets->NumRows() > 0)
{
while ($record = $rets->FetchRow($search))
{
$photos = $rets->GetObject("Property","Photo",$record['ListingID'],"*",0);
echo "<pre>";
print_r($photos);
foreach ($photos as $photo) {
$listing = $photo['Content-ID'];
$number = $photo['Object-ID'];
if ($photo['Success'] == true) {
$contentType = $photo['Content-Type'];
$base64 = base64_encode($photo['Data']);
echo "<img src='data:{$contentType};base64,{$base64}' />";
}
else {
echo "({$listing}-{$number}): {$photo['ReplyCode']} = {$photo['ReplyText']}\n";
}
}
echo "<pre>";
print_r($record);
}
$maxrows = $rets->IsMaxrowsReached();
echo " + Total found: {$rets->TotalRecordsFound()}<br>\n";
}