Ask Your Question

Revision history [back]

The class is invalid.
Change the class in the search from "RESIDENTIAL" to "RE_1".

The class is invalid. Remove the semicolon in setLoginUrl() call
Add: $config->setOption('use_post_method', true); after config setting.

Change the class in the search from "RESIDENTIAL" to "RE_1"."RE_1".
For some reason it doesn't seem to like it unless post is set.

Remove the semicolon in setLoginUrl() call
Add: $config->setOption('use_post_method', true); after config setting.
Change the class in the search from "RESIDENTIAL" to "RE_1".
For some reason it doesn't seem to like it unless post is set.

Wrapping the search request like this seems to work correctly.
$config->setOption('use_post_method', true);
$results = $rets->Search('Property', 'RESIDENTIAL', '(L_Status=1_0)', ['Limit' => 20, "offset" => 1]);
$config->setOption('use_post_method', false);

The reason this happens is that even though the search isn't passing a 'Select' parameter, the RETSIQ proxy does pass one with the fields you are allowed access to.
The RETSIQ Select causes it to exceed the maximum Query string length unless it is sent using POST.
Which is why it succeeds if you pass your own, shorter Select parameter in.

Remove the semicolon in setLoginUrl() call
Add: $config->setOption('use_post_method', true); after config setting.
Change the class in the search from "RESIDENTIAL" to "RE_1".
For some reason it doesn't seem to like it unless post is set.

Wrapping the search request like this seems to work correctly.
$config->setOption('use_post_method', true);
$results = $rets->Search('Property', 'RESIDENTIAL', '(L_Status=1_0)', ['Limit' => 20, "offset" => 1]);
$config->setOption('use_post_method', false);

The reason this happens is that even though the search isn't passing a 'Select' parameter, the RETSIQ proxy does pass one with the fields you are allowed access to.
The RETSIQ Select causes it to exceed the maximum Query string length unless it is sent using POST.
Which is why it succeeds if you pass your own, shorter Select parameter in.

Make sure to logout of the session when you are finished using it too.

It is done like this in PHRETS:
$rets->Disconnect();