Ask Your Question

Revision history [back]

PHRets only getting NULL

Hello, I'm using PHrets and every query I do always returns NULL. Here is what I have:


// pull in the packages managed by Composer require_once("vendor/autoload.php");

// setup your configuration $config = new \PHRETS\Configuration; //$config->setLoginUrl('') $config->setLoginUrl(''); $config->setUsername('ailchuk'); $config->setPassword('**'); $config->setRetsVersion('1.7.2');

// get a session ready using the configuration $rets = new \PHRETS\Session($config);

// make the first request $connect = $rets->Login(); //var_dump($connect->getBody());

$query = "(ListingID=0+)"; $results = $rets->Search( 'Property', 'RE_1', $query, [ 'QueryType' => 'DMQL2', 'Count' => 1, 'Format' => 'COMPACT', 'Limit' => 5, 'StandardNames' => 1, 'Select' => 'ListingID,ListPrice', ]);

foreach ($results as $record) { var_dump($r); }

Any help would be greatly appreciated.