我正在使用这个
PHP脚本从一个简单的搜索查询获得结果
here
我已经下载了属性here的元数据excel文件
$rets_login_url = "http://sef.rets.interealty.com/Login.asmx/Login";
$rets_username = "xxxxxxxx";
$rets_password = "xxxxxxxx";
$rets_user_agent = "PHRETS/1.0";
$rets_user_agent_password = "xxxxxxx";
//
// start rets connection
$rets = new phRETS;
// Uncomment and change the following if you're connecting
// to a server that supports a version other than RETS 1.5
$rets->AddHeader("RETS-Version", "RETS/1.5");
$rets->AddHeader("User-Agent", $rets_user_agent);
echo "+ Connecting to {$rets_login_url} as {$rets_username}
\n";
$connect = $rets->Connect($rets_login_url, $rets_username, $rets_password, $rets_user_agent_password);
// check for errors
if ($connect) {
echo " + Connected
\n";
}
else {
echo " + Not connected:
\n";
print_r($rets->Error());
exit;
}
$search = $rets->SearchQuery("Property","ResidentialProperty","(ListDate=1990-01-01+)");
while ($listing = $rets->FetchRow($search)) {
echo "Address: {$listing['StreetNumber']} {$listing['StreetName']}, ";
echo "{$listing['City']}, ";
echo "{$listing['State']} {$listing['ZipCode']} listed for ";
echo "\$".number_format($listing['ListPrice'])."\n";
}
$rets->FreeResult($search);
echo "+ Disconnecting
\n";
$rets->Disconnect();
当我运行此脚本时,它显示连接的结果,然后断开连接.但没有找到结果.我试了很多关于结果没有显示的问题的建议,但没有什么对我有用.哪里错了?
我的RETS服务器信息在这里:
RETS服务器:SEF RETS系统
RETS系统ID:SEFRETS
登录URL:http://sef.rets.interealty.com:80/Login.asmx/Login
RETS版本:1.5
服务器软件:Microsoft-IIS / 6.0
我也无法理解什么是$rets_modtimestamp_field =“LIST_87”;
请帮我.我需要一些关于如何从RETS获取数据的建议.