mls.php
<?php
$url2 = "retslive.rapmls.com";
$fp2 = fsockopen($url2,80,$errno,$errstr,30);
$A1 = "YOYO:sdmls:GRABB";
$A2 = "GET:/IMPV/rets/rets_login.asp";
$username = "YOYO";
$mlsid = "sdmls";
$auth_nonce = "$nonce";
$auth_opaque = '$opaque';
$raw_digest = md5($A1).":".$auth_nonce.":".md5($A2);
$resp = md5( $raw_digest );
$out2 = "GET /IMPV/rets/rets_login.asp\r\n";
$out2 .= "Authorization: Digest username=\"$username\", realm=\"$mlsid\", nonce=\"$auth_nonce\", opaque=\"$auth_opaque\", uri=\"/IMPV/rets/rets_login.asp\", response=\"$resp\" \r\n";
$out2 .= "Host: 70.84.86.98\r\n";
$out2 .= "Accept: */*\r\n";
$out2 .="User-Agent: RETSLOGGER/1.0\r\n";
$out2 .= "Connection: Close\r\n\r\n";
fputs($fp2, $out2);
while (!feof($fp2))
{
$grabo = fgets($fp2, 128);
print $grabo;
}
?>
when i point to it in my browser, i get this:
HTTP/1.1 401 Unauthorized Server: Microsoft-IIS/5.0 Date: Mon, 16 May 2005 23:40:53 GMT X-Powered-By: ASP.NET Connection: keep-alive RETS-Version: RETS/1.0 WWW-Authenticate: Digest realm="impv",nonce="80fcaaaa6c1d61585b308e96c6258ff6",opaque="00ac18e36d4a87c9aae6faacfca938c1" Connection: close Content-Length: 0 Content-Type: text/plain Cache-control: private
Any suggestions?