PHPBuilder - Logging into a RETS Server Page 3



RSS Twitter
Articles Application Architecture

Logging into a RETS Server - Page 3

by: Ron Goff
|
June 18, 2004

Now let us do some encrypting using MD5 of the above parts. This is pretty straight forward and pretty standard and is well documented in the manual.
http://www.rets.org/developer/retsReference1.0.1.zip
$raw_digest = md5($A1).":".$auth_nonce.":".md5($A2);

Next we will encrypt the above part.
$resp = md5( $raw_digest );

Now that we have the encryption completed, we login. Following are the headers. Again, these are pretty standard but they may vary slightly from one RETS server to another.
Here is the initial GET statement.
$out2 = "GET /IMPV/rets/rets_login.asp\r\n";

And the Authorization method.
$out2 .= "Authorization: Digest username=\"$username\", realm=\"$mlsid\", nonce=\"$auth_nonce\", opaque=\"$auth_opaque\", uri=\"/IMPV/rets/rets_login.asp\", response=\"$resp\" \r\n";

The host is just your server ip address that is running this code.
$out2 .= "Host: 63.175.244.266\r\n";

Accept is the type of documents that you want. Below is set to any and all.
$out2 .= "Accept: */*\r\n";


« Previous Page
1
|
2
|
3
|
4
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Ron Goff

Comment:



Comment:

(Maximum characters: 1200). You have characters left.