Having Issues Pulling Results in PhRETS
I am developing for a WordPress site and am getting an error that states: "Unexpected end of Query.". I have no idea what I'm doing wrong. I'm just putting in the example query from the documentation .
Url: http://wyo-rets.paragonrels.com/rets/...
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://wyo-rets.paragonrels.com/rets/fnisrets.aspx/WYO/login?rets-version=rets/1.7.2');
$config->setUsername('******');
$config->setPassword('******');
$config->setRetsVersion('1.7.2'); // see constants from \PHRETS\Versions\RETSVersion
$config->setHttpAuthenticationMethod('digest'); // or 'basic' if required
$config->setOption('use_post_method', false); // boolean
$config->setOption('disable_follow_location', false); // boolean
$rets = new \PHRETS\Session($config);
$connect = $rets->Login();
var_dump($connect);
$results = $rets->Search(
'Property',
'RE_1',
'*',
['Limit' => 3, 'Select' => 'LIST_1,LIST_105,LIST_15,LIST_22,LIST_87,LIST_133,LIST_134']
);
foreach ($results as $r) {
var_dump($r);
}
Comments
The Select parameter needs to be changed to use the actual field names from Paragon RETS.
Or you can use '*' to return all fields.
Also make sure to call: $rets->Disconnect() to close the session when finished.
Were you able to get this working?
I'm still having issues. It's saying "unexpected end of query" when I put *.
$connect = $rets->Login(); if ($connect) {
If I change "*" to "L_City=GILL" it gives me no error but returns 0 results.