Knowledge Base & Support Center

Featured Listings Web Service

The Featured Listings Web Service can only be used to display featured listings (listings in which the client or their brokerage represents the seller) on a website approved for IDX by the client's real estate association or MLS® System.

All listing displays must follow IDX rules and regulations set by the MLS® board.


Some MLS® boards do not permit the Featured Listings Web Service. Those boards are listed at the bottom of this page.

Introduction to Web Services

Web services provided by iHomefinder.com for use with our IDX packages are accessed using SOAP, a protocol for accessing Web Services. SOAP is a simple XML-based protocol to let applications exchange information over HTTP. Most web development languages (ASP, PHP, ColdFusion, Ruby on Rails, etc.) have libraries available for the development of SOAP client or server scripts.

For example, if you are developing a script in PHP, it is recommended that you use the SOAP extension for PHP, which includes several classes for scripts acting as a SOAP client or server.

WSDL Mode

For our example coding below, we will be using the WSDL (Web Services Description Language) mode for developing our PHP-SOAP client script. This mode relies on the web service supporting WSDL, which means that the web service provides information on the calls which it makes available via the SOAP interface. Be aware that it is possible to create non-WSDL mode scripting which is more efficient in execution, due to the elimination of the script making a WSDL call to the web service server.

See the following Zend Developer Zone article for further details on non-WSDL development in PHP.

Featured Listings Web Service

The Featured Listing Web Service allows you to request information on Active, or Sold/Pending listings for a specific account. Property listings may be requested based on a specific agent ID or office ID or Small or Large Broker PLUS packages. It is also possible to request information only on a specific featured listing via this web service.

Documentation: http://secure.idxre.com/ihws/FeaturedPropWebServiceDoc.html

SoapClient->getFunctions

In addition to the documentation above, you may use the following code to view a list of the functions available via the web service when using the WDSL mode.

<?php
$client = new SoapClient('https://secure.idxre.com/ihws/FeaturedPropWebService.cfc?wsdl');
echo "<pre>".print_r($client->__getFunctions(),1)."</pre>\n";
?>

Example Output:

Array
(
[0] => string getProps(double $uid, string $sid, string $propType, boolean $getActiveListings, boolean $getPendingSoldListings)
[1] => string getPropsByOfficeID(double $uid, string $sid, string $propType, double $officeID)
[2] => string getPropDetail(double $uid, string $sid, string $ListingNumber, string $MLSID, string $PropType)
[3] => string getPropsByAgentID(double $uid, string $sid, string $propType, double $agentID)
)

getProps

After you have initiated the SoapClient class in WSDL mode, the functions which were shown using the getFunctions example above will be available via the instantiated SoapClient object.

The most common example of a call using this web service would be the ‘getProps’ request, so we will use this for our example below.

Parameters for ‘getProps’ taken from documentation link above:

  • uid – Client’s iHomefinder ID number
  • sid – Client’s iHomefinder password
  • propType – Property Type. Possible values include SFR (Single Family Residences), CND (Condos), FRM (Farms), RI (Residential Income), MH (Mobile Homes), LL (Lots and Land), RNT (Rentals), COM (Commercial)
  • getActiveListings – Get Active Listings (true/false)
  • getPendingSoldListings – Get Pending and Sold Listings (true/false)
<?php
$uid = "40772";             // user ID for account  
$sid = "demopass";          // password for account  
$proptype = "SFR,CND";      // property type  
$getactive = "1";           // Boolean Value, Set to 1 to get active listings  
$getpendingsold = "0";      // Boolean value, set to 0 to not get Pending/Sold listings  
$client = new SoapClient('https://secure.idxre.com/ihws/FeaturedPropWebService.cfc?wsdl');
echo $client->getProps($uid, $sid, $proptype, $getactive, $getpendingsold);
?>

Example Output:

<!--?xml version="1.0" encoding="UTF-8"?-->
<!--?xml version="1.0" encoding="UTF-8"?-->
<featured_props>
<featured_prop listingnumber="2020498" mlsid="0">
<list_price><!--[CDATA[45000000.000000000000]]--></list_price>
<house_numb><!--[CDATA[25]]--></house_numb>
<street_nam><!--[CDATA[Dartmouth Dr.]]--></street_nam>
<addr_fpn><!--[CDATA[F]]--></addr_fpn>
<city_name><!--[CDATA[Berkeley]]--></city_name>
<state><!--[CDATA[CA]]--></state>
<zip><!--[CDATA[94705]]--></zip>
<prop_sub_t><!--[CDATA[SFR]]--></prop_sub_t>
<totl_bed>3</totl_bed>
<totl_fbath>5</totl_fbath>
<totl_hbath>1</totl_hbath>
<totl_fl_sq>3200</totl_fl_sq>
<agt_code>
<unit_desig>
<office_nam>
<office_cod>
<agt_frstnm>
<agt_lastnm>
<office_phn>
<remarks>
<remarks2>
<remarks3>
<year_built><!--[CDATA[2025]]--></year_built>
<address_filtered><!--[CDATA[displayAddress]]--></address_filtered>
<propdescyn>
<propdescription><!--[CDATA[This is property description. This is property description. This is property description. This is property description. This is property description. This is property description.]]--></propdescription>
<photoyn>1</photoyn>
<photourl><!--[CDATA[http://pix.idxre.com/pix/clientPhotos/0_2020498_25dartmouth.JPG]]--></photourl>  
<touryn>
<tourlink>
<virtualtourlink>
<toururl>
<phototouryn>0</phototouryn>
<phototourlink>
<reportyn>
<reporturl>
<reportlink>
<viewcode>
<openyn>
<opendate>
<opentime>
<openagent>
<flashtouryn>
<flashtoururl>
<flashtourlink>
<mapyn>1</mapyn>
<opendatetext>
<extralinkyn>0</extralinkyn>
<extralinkurl>
<extralinktext>
<addressyn>
<addresshousenum>
<addressstreetnam>
<vprice>
<sqft2>
<dateimported>2009-05-27 16:40:15.0</dateimported>
<sharecustom_yn>0</sharecustom_yn>
<county>
<mlsphotourl>
<mlsthumbnailurl>
<mlsphotocount>
<cityid>0</cityid>
<countyid>0</countyid>
<ihfphotourl>
</ihfphotourl></mlsphotocount></mlsthumbnailurl></mlsphotourl></county></sqft2></vprice></addressstreetnam></addresshousenum></addressyn></extralinktext></extralinkurl></opendatetext></flashtourlink></flashtoururl></flashtouryn></openagent></opentime></opendate></openyn></viewcode></reportlink></reporturl></reportyn></phototourlink></toururl></virtualtourlink></tourlink></touryn></propdescyn></remarks3></remarks2></remarks></office_phn></agt_lastnm></agt_frstnm></office_cod></office_nam></unit_desig></agt_code></featured_prop>
</featured_props>

Featured Properties Web Application

About

The Featured Properties Application provides a custom listing index of featured listings directly on the clients custom website, with links to the listing detail pages provided via the iHomeFinder IDX.

Demonstration

Featured Properties Application Demo

Download

fpwa-v0.240 - Responsive - (This is sample code for testing, and not intended to be used long-term.)

Installation

  1. Place the files from the ZIP file into a directory on your PHP enabled website.
  2. Edit the ‘config.php’ file with the $uid and $sid values as indicated in the comments. Other options may optionally be modified.
  3. Edit the ‘/templates/listing-summary.php’ template file with the HTML layout desired for each listing in the index.
  4. Edit the ‘fpws.css’ file to use CSS styles you wish applied to the display of the Featured Listings index.
  5. Optionally edit or replace the CSS inside of ‘pagination.css’ to change the style of the pagination links.

Credits

Thanks to mis-algoritmos.com for the Digg Style Pagination library

MLS® Restrictions

Please note, some boards might not permit the Featured Listings Web Service.
At this time, the Featured Listings Web Service is not permitted in these boards:

* LA - NOMAR
* ME - MREIS
* NC - North Carolina Regional MLS (Wilmington)

Did you find this article helpful?