Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Note: Much of the documentation in this wiki covers the older 1.x version. Please see this repository's README file for the new 2.x version documentation.
A simple, free, open source PHP library for using RETS.
PHP + RETS = PHRETS
PHRETS provides PHP developers a way to integrate RETS functionality directly within new or existing code. A standard class of functions is made available to developers to connect and interact with a server much like they would with other APIs.
PHRETS handles the following aspects of RETS communication for you:
- Response parsing (for other non-XML responses such as HTTP multipart)
- XML Parsing
- Simple variables and arrays returned to the developer
- RETS communication (over HTTP)
- HTTP Header management
- Session/Cookie management
- Install using Composer. Add troydavisson/phrets to your
composer updateand you're set.
- Manual download. Grab the source code here (from GitHub).
The best place to ask for help is in our Google Group
Note: These examples may not work in all cases depending on the features supported (and correctly implemented) by the RETS server
Quick Connection Tests
- [Connect, quick request to verify connection is good, disconnect](wiki/Connect, quick request to verify connection is good, disconnect)
- [Connect (using User-Agent authentication), verify connection, disconnect](wiki/Connect using User-Agent authentication)
- [Connect with a specific user-agent, verify and disconnect](wiki/Connect with a specific user-agent, verify and disconnect)
- [Connect, download listing data in CSV format, disconnect](wiki/Connect, download listing data in CSV format, disconnect) - Requires 'Offset' support on the server
- [Connect, download listing data in CSV format, disconnect using auto-Offset feature](wiki/Connect, download listing data in CSV format, disconnect using auto-Offset feature) - Requires 'Offset' support on the server and PHRETS 1.0rc2 or greater
- [Create MySQL tables from RETS metadata](wiki/Create MySQL tables from RETS metadata) - Takes the RETS METADATA-TABLE definitions and makes the SQL to create the database table in MySQL
- [Create Batch List](wiki/Create Batch List) - Allows you to pass an array of values and returns a comma separated list of those values. Very helpful with PHRETS GetObject() requests.
Tips and Tricks
- [flexmls RETS server](wiki/flexmls RETS server)
- [Timezone Handling](wiki/Timezone Handling)