我正在使用 PHRETS PHP 库从 rets API 获取 RETS 数据。我有获取数据的问题。它给了我未找到请求的类错误。请帮助解决此错误。我的代码是:
date_default_timezone_set('America/New_York');
require_once("vendor/autoload.php");
$log = new \Monolog\Logger('PHRETS');
$log->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG));
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://rets.navicamls.net/login.aspx')
->setUsername('xxx')
->setPassword('xxx')
->setRetsVersion('1.7.2');
$rets = new \PHRETS\Session($config);
$rets->setLogger($log);
$connect = $rets->Login();
if ($connect) {
echo "Connected!<br>";
}
else {
echo "Not Connected!<br>";
print_r($rets->Error());
exit;
}
//results consists of Property, class, and query
$results = $rets->Search(
"Property",
"A",
"*",
[
'QueryType' => 'DMQL2',
'Count' => 1, // count and records
'Format' => 'COMPACT-DECODED',
'Limit' => 10,
'StandardNames' => 0, // give system names
]
);
print_r($results); exit;