PHP RETS Open Houses Propertys

505 Views Asked by At

Hello i want to find open houses property using PHP RETS script. i have did below code in which i am able to find Open Houses Property details like MLS_Number,From-date,To time but i am not able to get based on MLS_Number find property other details like address,price,room No and other details. what i have tried so far below is code.

$retsFilters['IS_ACTIVE '] = true;
    $retsQuery = '';
    foreach ($retsFilters as $key => $value) $retsQuery .= ',('.$key.'='.$value.')';
    $retsQuery = trim($retsQuery, ',');     
    $result = $rets->SearchQuery("openhouse", "OpenHouse",$retsQuery,array('Format' => QUERY_FORMAT));

from above code returns only

Array
(
    [AdvertOpenHouse] => 1
    [Agent_MUI] => 2871
    [Description] => 
    [FromDate] => 2016-09-01T00:00:00.000
    [FromTime] => 1400
    [InputDate] => 
    [IS_ACTIVE] => 1
    [IsDeleted] => 0
    [Listing_MUI] => 9985949
    [listing_type] => RE
    [matrix_unique_ID] => 10268565
    [mls_number] => 548766
    [ModificationTimestamp] => 2016-01-08T13:31:23.390
    [Open_House_Refreshments] => 
    [ToTime] => 1600
)

but i want also more property's details like address,streetName,city,price and other details.

this is the my login url http://rets.saskmls.ca/rets/login.ashx

if any one have idea please help thanks in advance.

2

There are 2 best solutions below

0
On

Well the Openhouse Resource and underlying classes would not contain this kind of information. There should be a Property Resource with many different kinds of property classes within (Residential, Commercial, Land, etc...)

You need to examine the metadata from the RETS server, it will contain XML that describes all the available Resources, Classes and fields.

Note the signature of the SearchQuery method:

SearchQuery ( string $resource, string $class, string $query [, array $options] )

Your resulting query would look something like this:

SearchQuery("Property", "RES", "(Status=|A)")
0
On

I am using Paragon as a MLS back-end provider. When I get an "OpenHouse" resource, there's a field called

L_DisplayId

which is present in "Property" resources.

This field makes a relationship between the two resources.

Once you know L_DisplayId value from an open house, you can search for a property sending L_DisplayId as a search parameter.

Hope that can help you.