Skip to content
Troy Davisson edited this page Mar 5, 2016 · 18 revisions

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

Introduction

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
  • Authentication
  • Session/Cookie management

Download

Get Help

The best place to ask for help is in our Google Group

Examples

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)

Data Downloads

  • [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

Documentation

View the list of functions

Code Snippets

  • [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)