Setting up miniRETS

We've tried to make getting a RETS connection and MLS data simple. Our system is open source and can be used in any kind project including commerical with no exceptions. We're tired of the difficult RETS clients out there and we wanted a simplier way.

How to Start
First things first you have to have been giving RETS access by your local board to even use miniRETS. If you've got that we can proceed. Otherewise your gonna have to start making some phone calls to your local MLS board :)

When you get your RETS access your given a few things.
1) RETS login URL something like http://rets.retsserver.com:6103/RETS/login.apsx (this is not real)
2) RETS username
3) RETS password
4) Sometimes a User Agent (MyCompany/1.0) (again this is not real)

Once you have that info you're ready to update the configuration file miniRETS.php.

Setting up the Config
Open up miniRETS.php in a text editor. And start filling it in.

Use the domain from the login URL in the Host option.
$miniRETS['Host'] = 'rets.retsserver.com';

Next use the port shown in the login URL and if non is present then use 80.
$miniRETS['Port'] = '6103';

Next set the RETS version probably 1.5. You may have to try 1.0 or even 1.7 if you can't get data back.
$miniRETS['Version'] = '1.5';

Now set the Auth_Type you can use Basic, Digest or Digest-QOP. Again you may have to try each until you get data.
$miniRETS['Auth_Type'] = 'Digest';

These next variables need to be set they usually follow the format of the login url
$miniRETS['Get_Meta'] = '/RETS/getmetadata.aspx';
$miniRETS['Get_Object'] = '/RETS/getobject.aspx';
$miniRETS['Login'] = '/RETS/login.apsx';
$miniRETS['Search'] = '/RETS/search.aspx';

Set you username and password
$miniRETS['Username'] = 'GOFF';
$miniRETS['Password'] = '5540495';

And finally your user agent. If you weren't given one you can usually just make one up.
$miniRETS['User_Agent'] = 'CONRC/1.0';

Setting up your Query
Now we get into the meat of the actual query that will request data. Here is the sample query.
Class=RESI&SearchType=Property&QueryType=DMQL2&Format=Standard-XML&Limit=100&Query=(SearchPrice=0-10000000),(Status=|A,P,S,W,C)

To get a good idea of what fields and classes(property types) you can pull from you may want to run the MetaData query. You'll need to comment out the search lines and uncomment these lines.
//Metadata call
$GetXML = miniRETS($miniRETS,'Get_Meta');
//Metadata query sample
$miniRETS['Query'] = "Type=METADATA-TABLE&ID=0";

Run miniRETS.php in the browser and view source to see the available classes, searchtypes (which is mostly Property), field names which is in the StandardName tag (you'll most likelyneed to change the sample SearchPrice and Status)

Support
Use the support features of source forge or drop me a line rontgoff@gmail.com and I'll be happy to help. If you need someone to set all this up for you contact me and I should be able to help or find someone that can.

We also need project memebers so let me know if you want to help with miniRETS in any way.