1:55pm June 19, 2009
RETS model for CakePHP 1.2
It's been a while since I released any PHP code for working with the RETS system. If you've worked with RETS, you know how difficult and frustrating it is. Hopefully, my code will be of some help.

I rarely work outside of the CakePHP framework anymore. Since that is the case, I this code release will be a RETS model for use with CakePHP 1.2. It handles an initial download of all active listings and stores them in the database. It will also handle a CRON job for periodically getting newly added, updated, or deleted listings from your RETS provider.

Please review rets.sql for the table structure used with this model and associated models.

The main methods you will use are mass_download which is used to fill your database with all the listings. Run this once and let it run until finished. It can take hours depending on the speed of the RETS server.

The other method to use is get_updated_properties. This should be scheduled with CRON to periodically get new listings. It has a locking system built in so that multiple CRON jobs won't run the same function. It will also unlock if CRON never finished.

Downloads: /models/rets.php | rets.sql
Views  341 Comments  1
Filed under: CakePHP, PHP, Web Development, Model
Add Comment
jake
You should check out PHRETS
View Chris Thompson's profile on LinkedIn
Loading...