#native_company# #native_desc#

Logging into a RETS Server Page 4

By Ron Goff
on June 18, 2004

Your user agent is important. You will need to come up with a name for your code and
register it with the RETS/MLS company.

$out2 .=”User-Agent: RETSLOGGER/1.0rn”;

Close the connection.

$out2 .= “Connection: Closernrn”;

This statement will send the headers we have above.

fputs($fp2, $out2);

Now, we will create a loop statement to return all information returned from the RETS

while (!feof($fp2)) 
	$grabo = fgets($fp2, 128);  
	print $grabo;
Run the code and if you log in successfully you will receive a session-cookie, this
small line of characters and numbers is a huge reward for your perseverance and
countless hours of keystrokes. You will also receive other page links that will give
you access to searches and other information.
This should help you get started in the wonderful world of RETS which is a great
system and can be used in many ways once you get over the hurdle of logging in.
Ron Goff