#native_company# #native_desc#

Logging into a RETS Server Page 2

By Ron Goff
on June 18, 2004

Breaking Down The Code
This is the URL of the RETS server.

$url2 = “retslive.mls.com”;

Open a connection using fsocket. This is a standard connection script.

$fp2 = fsockopen($url2,80,$errno,$errstr,30);

Create your parts that will be used by MD5.
A1 consists of your “username:mlsid:password” you will have to get these from your
local MLS office.

$A1 = “YOYO:sdmls:GRABB”;

A2 consists of the GET of the login page. You may have to get this information from
the RETS/MLS company that you are trying to use. Sometimes they do not place this
information on the internet, you may have to call or email the company.

$A2 = “GET:/IMPV/rets/rets_login.asp”;

“Nonce” and ‘Opaque’ is a sting of characters the RETS server will spit out if you
go to the page without logging in. You will need to get this, either going to it
manually or writing a script. Use Fsocket open to view the headers to get this
information and parse through it.

$auth_nonce = "$nonce";
$auth_opaque = '$opaque';