homepage Welcome to WebmasterWorld Guest from 54.166.128.254
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Need help on PHRETS Query
Query to pull all property listings
hematurupu



 
Msg#: 4472717 posted 9:20 am on Jul 5, 2012 (gmt 0)

Hi

I am using PHRETS to pull MLS data.

My website has a search criteria like Area,Property Type and MLS listing. I am able to get results for both i.e when a user selects Property Type like SF, MF or CC or enters MLS listing number.

The problem is only with the Area, like if user selects an area I am unable to filter all properties(SF, MF, CC) in that area. I found few examples which are using a resource 'Property' but that resource is not available to me.

Any advise will be of great help.

Many Thanks

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4472717 posted 4:56 pm on Jul 5, 2012 (gmt 0)

Hi and Welcome to WebmasterWorld

I'm not particularly familiar with the RETS protocol or the PHRETS api.

But if neither of these support the exact queries you would like to filter on, then it is likely you are going to need to do some additional filtering on your side. You would send their service a query that is as specific as possible, and anything else you filter before printing it to the user of your site.

tec4



 
Msg#: 4472717 posted 11:47 pm on Jul 6, 2012 (gmt 0)

When you say "if user selects an area I am unable to filter all properties(SF, MF, CC) in that area." I assume you are talking about trying to query the MLS Feed directly from an end user on your site?

I've always used the PhRETS client to simple be the middle-man between myself and the Feed and use it to update my DB/Tables on my local server. That way, you can do all your search filtering on your server's side like eelixduppy had stated.

tec4



 
Msg#: 4472717 posted 11:51 pm on Jul 6, 2012 (gmt 0)

Also, the inability to query the Feed in specific ways is generally not something to do with PhRETS, but instead the feed itself...MLS providers will put restrictions on how you can query it. The connection client can do whatever query you want, but if the feed doesn't allow it, you will receive an error message.

hematurupu



 
Msg#: 4472717 posted 6:29 am on Jul 12, 2012 (gmt 0)

Hello tec4

Thank you for a response.

You have mentioned that "I've always used the PhRETS client to simple be the middle-man between myself and the Feed and use it to update my DB/Tables on my local server."

Could you please advice how do I do this.

Regards
Hema

tec4



 
Msg#: 4472717 posted 4:48 pm on Jul 12, 2012 (gmt 0)

Basic logic of it is that you are going to need to create a table on your local server with the same field/column names your feed has. Then you need to query the feed to retrieve the data...make sure you are only selecting the fields/columns you have in your local table.

Once you've done your query, you can loop through the results and write them to a text file or csv. Once you have the info stored locally, you can grab the info and import that into your DB.

A bit hard to grasp...took me awhile to get my head around it, but hope that pointed you at least in the right direction.

hematurupu



 
Msg#: 4472717 posted 6:23 am on Jul 13, 2012 (gmt 0)

Thank You tec4 for your suggestion.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved