Working With RETS
As we continue to add MLS data to the map, we are sometimes faced with the dreaded RETS format for retrieving said MLS data. The problem with RETS is that there are so many version standards and so many different interpretations of those standards. A script that works on one MLS system does not necessarily work on another system, even if both are using the same RETS specification.
With that said, our team faced a challenge in tackling an antiquated RETS/1.0 system that not only had a flakey implementation, but was often times returning corrupt XML due to the DB server hanging during the SQL query. We were finally able to get the data we wanted, but it wasn’t until two of us trial and errored out a script in five hours.
For anyone that wants to deal with a flakey RETS/1.0 implementation, you can have at our script. We had to bypass the usual nonce, cnonce, opaque, response rigamarole because the RETS server was not replying with the correct HTTP headers. Instead we initiated the RETS login, grabbed a plain cookie and used that to keep the session alive. The script is based on the fine work done over at http://www.thompsonbd.com/RETS/rets_example.php.
Here is the RETS PHP Script.
No comments yet. Be the first.
Leave a reply


