Ask Your Question

Am not getting any results from PHPRETS

asked 2016-08-16 20:05:27 -0600

updated 2016-08-18 17:24:45 -0600

I am using PHPRETS to connect, and have a few different search criteria:

$results = $rets->Search("property", "RES", "", array('Limit' => 5));
$results = $rets->Search(
        'QueryType' => 'DMQL2',
        'Count' => 1, // count and records
        'Format' => 'COMPACT-DECODED',
        'Limit' => 99999999,
        'StandardNames' => 0, // give system names

But I'm not getting any results. What should the search criteria be to see if there are any results available at all?

edit retag flag offensive close merge delete


What MLS URL and account name? Was the login successful?

bwolven gravatar imagebwolven ( 2016-08-16 21:36:32 -0600 )edit

MLS URL: username: rnettleton

broizen2 gravatar imagebroizen2 ( 2016-08-16 21:48:31 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-17 08:46:08 -0600

updated 2016-08-18 13:57:56 -0600

Please use this Login URL: ""

I don't see where you are sending the Query parameter. The Query parameter is only optional for RETS/1.8 and up and you are using 1.7.2.

If you don't want to use a specific query you can use a generic one like this depending on the resource:

Property/Media/Tour/OpenHouse: (L_ListingID=0+)

Agent/ActiveAgent: (U_AgentID=0+)

Office/ActiveOffice: (O_OfficeID=0+)

Also in our logs I see some requests returning invalid class error.

The valid property classes for SAAM are: RE_1, LD_2, CI_3, RI_4

Update 8/18/2016 09:20 CST

There are some examples of how to use PHRETS and how to do searches on



I see a few things wrong with your code:

  • You didn't provide a query for your search unless you specify RETS/1.8 the query parameter is required. If you add something like (L_ListingID=0+) it should work.

  • The Select parameter tells what data fields to return. If you leave it off, it returns all available fields. You have it set to: "LIST_1" which isn't a valid field name.

Something like this should work provided you did the other steps to establish a connection:

$results = $rets->Search("property", "RE_1", "(L_ListingID=0+)", array('Limit' => 5, 'Select' => 'L_ListingID')); // print_r($results); foreach ($results as $r) { var_dump($r); }

I would also suggest doing a logout, which I think is $rets->Disconnect(), when you are finished which the PHRETS examples don't show which will make sure the session gets closed.

edit flag offensive delete link more


Thanks for the quick response! Here is what I am trying:

$results = $rets->Search("property", "RE_1", "", array('Limit' => 5, 'Select' => 'LIST_1'));
// print_r($results);
foreach ($results as $r) {

I'm not getting any results

broizen2 gravatar imagebroizen2 ( 2016-08-17 19:30:33 -0600 )edit

Were you able to resolve the issue you were having?

vendorsupport gravatar imagevendorsupport ( 2016-09-16 10:38:02 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-08-16 20:05:27 -0600

Seen: 1,171 times

Last updated: Aug 18 '16