6

I'm tasked with integrating RETS I to a php based website. I've heard that phrets is a good library to use. The site is on a shared hosting platform (godaddy). I thought I could build a page with some search fields and have it do a query and display the results on a second page? Other places I've read name it sound more like I will still need to run a local server that copies the data and stores it locally. Now I'm not sure what to do. Any suggestions or help would be greatly appreciated.

David
  • 17,673
  • 10
  • 68
  • 97
Jason Shultz
  • 940
  • 1
  • 19
  • 36

5 Answers5

9

First of all...get off your shared server and someplace where you can get root access. RETS requires access to port 6103 and a shared server is going to block access to it. Second, PHP is a perfectly good processing tool for RETS. VieleRETS is built in PHP and it's a great piece of software built by the center for realtor technology...the same people that created the RETS standard.

Michael M
  • 8,185
  • 2
  • 35
  • 51
Terry Harmon
  • 114
  • 1
  • 3
  • thank you for the heads up on this. Since I wrote the question I ended up moving to my own VPS. He ended up hiring some other company to build it for him. No big deal, it was over my head at the time. This is good info to have, though, thank. :) – Jason Shultz Jan 27 '11 at 04:07
  • No problem! RETS is a tricky beast, and there needs to be more information for programmers. – Terry Harmon Jan 27 '11 at 04:30
  • 1
    I'm currently implementing an MLS search based on RETS in a shared server. By getting a static IP, I was able to get port 6103 opened for outgoing, which is all that's required for RETS access with PHRETS library. The main difficulty has been downloading all the images, which takes a long time, although not excessive CPU time. – yitwail Jul 26 '12 at 08:58
  • @yitwail Does this solution still work for you? I just talked to GoDaddy and they suggested getting a VPS. Apparently a static IP wouldn't work on their shared server. – Michael Lynch Sep 09 '16 at 16:26
1

RETS IQ using java is better way to Implement rather then PHRETS

Create Good Data feed Arch for RETS using RETS IQ java then Push that one in database better solution for you

1

I looked at the product from RETS DEVELOPEMENT GROUP and I guarantee if you follow the guidelines outlined by the developer you will not understand RETS or IDX because the terminology being used on that site is just wrong on most levels. I'd stick with vieleRETS or another product.

Jared
  • 11
  • 1
0

Actually it will work using PHP on a shared server if:

  • You have a host that allows access to port 6103. As other people have pointed out this is not the norm and definitely not with Godaddy, but there are a few out there.
  • You are covering a market that is not huge.
  • You optimize and optimize again your requests from the RETS server to only pull changes.

So if you have a limited budget (which seems to be common with realtors) you can:

  • Use a shared host (on an accommodating hosting service).
  • You will need to create a local database for displaying your results.
  • Set up a cron job to pull down changes from the RETS server say every 24 hours preferably when the server is likely to not be under load, like at night.
  • Construct a RETS query to only pull listings from the area you care about.
  • Query the server for changes and only pull changed/new listings.
  • Save on bandwidth and server load if your RETS service has an image hosting service, rather than download them to your server.

But you are playing with fire - pulling a lot of records and images takes time and could lead to the hosting account being disabled.

NB: I would not necessarily rely on the change list from the RETS server. I have been burnt before by it giving invalid data.

Mrnt
  • 69
  • 4
-3

Don't try to work with RETS using PHP, even if you're a master PHP developer, you will fail miserably because PHP is so not the tool for RETS processing.

That said. The defacto tool for RETS is libRETS and it has compatible swig bindings to Ruby, Python, and I believe C# as well as a native C++ implementation.

Lastly, its technically possible to have a web request fire off a RETS query, get the results back, and then transform the data for presentation, but its very possible for a relatively simple query to take upwards of 15-30 seconds due to load on the remote RETS server. So its usually better to build or find software to replicate all or some of an MLS's active listings.

David
  • 17,673
  • 10
  • 68
  • 97
  • 2
    -1 This is terrible advice. I've implemented countless RETS feeds all managed from php scripts which run on the command line and work perfectly fine; even to the fact of updating all of them hourly. Using a library such as phRets helps mitigate your learning curve. – Petrogad Sep 08 '11 at 12:53
  • 1
    It depends I suppose on what RETS feed's you are talking about. If its a smallish feed like Tri-cities in Washington where daily diffs are under 5K properties then PHP will work, but if it's something like the Chicago RETS feed where there was 15K-25K updates every hour, PHP will fall behind. PHP is a fantastic web language but it's just that, a web language, it's memory model has improved with the introduction of in process GC in 5.3 but it still isn't on par with C# or Python for very long running processes and more efficient memory allocation/de-allocation. – David Sep 11 '11 at 21:08
  • Still disagree; Running large areas which have 15k updates hourly and it's working just fine. There is a large distinction between what / how you're importing which make a huge difference. Pulling down the data is relatively fast (and dependent on the RETS server). From there it's making smart decisions on how to store and how to best load for quick performance. I agree that other languages with multi-threading do this better, but PHP does it just fine to get data loaded in. – Petrogad Sep 12 '11 at 14:27
  • Yup this is awful advice, I agree. I have methods implemented to detect modified dates etc. and caching it smartly. Don't need to branch out into another language just to handle RETS feeds. I have multiple RETS feeds set up with PHP too, no problems after I did some optimization on the code. – jeffkee Mar 14 '13 at 00:45
  • 1
    @jeffkee I made my statement in 2010 and still standby it, especially if your dealing with larger or multiple MLS's like Chicago where there can be 2-3 million plus property updates in a day and speed is critical. In the last 3 years PHP has made strides but it's still inferior to Python, C#, or Ruby 1.8 plus. How much of your opinion is emotional and how much is logic? I've got several years working experience with Python, C#, Ruby, and PHP since 2003. Use the right tool for the job, not what fits your pride. – David Mar 14 '13 at 03:16
  • If the ROI spent on hiring a C++ or Python/Ruby developer is worthwhile compared to the volume that the company is looking at, I can see that being logical. Money is a huge factor in this business too, and availability of HR pool. – jeffkee Mar 18 '13 at 23:58
  • 1
    @jeffkee That's indeed true, PHP developers are 10x more abundant then any other language. – David Mar 20 '13 at 02:16