当使用 php phrets 从 MLS 中提取列表照片时,它是否会在 MLS 更新它们后自动将旧列表照片与新列表照片更新到我的 Web 服务器上?
下面是我拉列表照片的代码?
<?php
$search = $rets->SearchQuery(
'Property',
6,
'(105=2014-01-01+),(193=A)',
array(
'Format' => 'COMPACT-DECODED',
'Select' => '',
'Count' => 1
)
);
if($rets->TotalRecordsFound() > 0) {
while($data = $rets->FetchRow($search)) {
$id = $data['sysid'];
$n = 1;
$photos = $rets->GetObject('Property', 'Photo', $id);
foreach($photos as $photo) {
if ($photo['Success'] == true) {
file_put_contents('images/'.$id.'-'.$n.'.jpg', $photo['Data']);
}
$n++;
}
$rets->FreeResult($photos);
}
echo "Collected data successfully\n";
} else {
echo '0 Records Found';
}
?>