我正在使用 PHREST 方法从 MLS 服务器获取照片。我无法获取我正在使用以下函数的属性图像。
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";
}