I need to connect to both FNIS and FBS.
I use phRETS for FBS and it works great!
I am having a problem with phRETS FNIS connection.
I have studied phRETS documentation and this group posts.
When I use RetsConnect on my local system I connect fine and download
data.
When I use
http://www.idxadvantage.com/rets-setup/ I connect fine and
see complete table structure.
When I use
retsmd.com online I connect fine and see all MetaData, but
I must check Force Basic Auth.: Yes
When I try to run this php script (that I use for FBS with success):
=======================
require ('phRETS.php');
$rets = new phRETS;
$rets->AddHeader("Accept", "*/*");
$rets->AddHeader("RETS-Version", "RETS/1.5");
$rets->AddHeader("User-Agent", "PHRETS/1.0");
$rets->SetParam("cookie_file", "phrets_cookies.txt");
$rets->SetParam("debug_mode", true);
$rets->SetParam("force_basic_authentication", true);
$rets->Connect("
http://glarmls.rets.fnismls.com/rets/fnisrets.aspx/
GLARMLS/login", "myusername", "mypassword");
echo"connected";
$rets->Disconnect();
=======================
rets_debug.txt returns this:
< HTTP/1.1 401 Invalid Username/Password combination
< Date: Mon, 10 Aug 2009 20:58:37 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By:
ASP.NET
< X-UA-Compatible: IE=EmulateIE7
< X-AspNet-Version: 2.0.50727
< RETS-Server: RETS-Paragon/1.0
< RETS-Version: RETS/1.5
< WWW-Authenticate: Digest
qop="auth",realm="GLARMLS",nonce="2009-08-10T16:08:37",opaque="",stale="false",domain="\rets
\fnisrets.aspx\GLARMLS"
< Cache-Control: private
< Expires: Mon, 01 Jan 0001 00:00:00 GMT
< Content-Length: 0
<
* Connection #0 to host
glarmls.rets.fnismls.com left intact
* Issue another request to this URL: '
http://glarmls.rets.fnismls.com:
80/rets/fnisrets.aspx/GLARMLS/login'
* Re-using existing connection! (#0) with host
glarmls.rets.fnismls.com
* Connected to
glarmls.rets.fnismls.com (208.93.241.14) port 80 (#0)
* Server auth using Digest with user 'acmewebwerks'
> GET /rets/fnisrets.aspx/GLARMLS/login HTTP/1.1
Authorization: Digest username="acmewebwerks", realm="GLARMLS",
nonce="2009-08-10T16:08:37", uri="/rets/fnisrets.aspx/GLARMLS/login",
cnonce="MTI0OTkz", nc=00000001, qop="auth",
response="f097dd6a54f2fae07a9f2b212c1b9322", opaque=""""
Host:
glarmls.rets.fnismls.com
Accept: */*
RETS-Version: RETS/1.5
User-Agent: PHRETS/1.0
< HTTP/1.1 401 Nonce Expired
< Date: Mon, 10 Aug 2009 20:58:37 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By:
ASP.NET
< X-UA-Compatible: IE=EmulateIE7
< X-AspNet-Version: 2.0.50727
< RETS-Server: RETS-Paragon/1.0
< RETS-Version: RETS/1.5
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest
qop="auth",realm="GLARMLS",nonce="2009-08-10T16:08:37.79929e56b8dada6c1ecdb2ab8b9a1e51",opaque="",stale="true",domain="\rets
\fnisrets.aspx\GLARMLS"
< Cache-Control: private
< Expires: Mon, 01 Jan 0001 00:00:00 GMT
< Content-Length: 0
<
* Connection #0 to host
glarmls.rets.fnismls.com left intact
* Closing connection #0
=======================
I have tried it using:
$rets->SetParam("force_basic_authentication", false);
and
//$rets->SetParam("force_basic_authentication", true);
with the same result.
It just seems odd to me that the login would work ok using other
methods but not this one.
I suspect I am overlooking something simple...