My code:
<?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;
}
?>
what is displayed when pointing my browser to mls.php (code above)
HTTP/1.1 401 Unauthorized Server: Microsoft-IIS/5.0 Date: Sat, 14 May 2005 18:22:23 GMT RETS-Version: RETS/1.0 WWW-Authenticate: Digest realm="impv",nonce="847e4f526cf9e8d658278bfae38f6863",opaque="f18dddc9a0f629a3ad49e66a3ff29a56" Connection: close Content-Length: 0 Content-Type: text/plain Cache-control: private
Did i do something wrong?😕