I am using the PHRETS PHP library to fetch the RETS data from the rets API. I have and issue with getting the Data. It's giving me the Requested Class not found Error. Please help to solve this Error. My Code is:
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;