Going back to basics I decided to test the connection using the
Example A code from the site and I'm getting a connection error.
I know the login is correct because I can successfully log in using
Rets Connector.
Here is the debug file:
* About to connect() to rhb.rets.interealty.com port 80 (#0)
* Trying 69.87.62.186... * connected
* Connected to rhb.rets.interealty.com (69.87.62.186) port 80 (#0)
> GET /Login.asmx/Login HTTP/1.1
Host: rhb.rets.interealty.com
Accept: */*
RETS-Version: RETS/1.5
User-Agent: PHRETS/1.0
Accept: */*
< HTTP/1.1 200 OK
< Date: Sun, 11 Dec 2011 01:30:28 GMT
< Server: Microsoft-IIS/6.0
< Cache-Control:private
< X-AspNet-Version: 2.0.50727
< Transfer-Encoding: chunked
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
<
* Connection #0 to host rhb.rets.interealty.com left intact
<RETS ReplyCode="20037" ReplyText="User Agent not registered or
denied. Reference: 7e516643-8ca5-4ef3-8752-db30f9e645d1" />
* Closing connection #0
Looks like the RETS provider requires you to include user agent info so
they know what data is allowed for your account. They should have included
a user-agent string along with the rest of your authorization info.
Do something like this before calling $rets->Connect():
$rets->AddHeader("User-Agent", 'your_given_user_agent');
server admin sent me the proper user agent (RETSConnector/1.5) and I
attempted again using that, but it's still failing:
* About to connect() to rhb.rets.interealty.com port 80 (#0)
* Trying 69.87.62.186... * connected
* Connected to rhb.rets.interealty.com (69.87.62.186) port 80 (#0)
> GET /Login.asmx/Login HTTP/1.1
Host: rhb.rets.interealty.com
Accept: */*
User-Agent: RETSConnector/1.5
RETS-Version: RETS/1.5
Accept: */*
< HTTP/1.1 200 OK
< Date: Sun, 11 Dec 2011 04:54:32 GMT
< Server: Microsoft-IIS/6.0
< Cache-Control:private
< X-Powered-By: ASP.NET
< X-AspNet-Version: 2.0.50727
< Transfer-Encoding: chunked
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
<
* Connection #0 to host rhb.rets.interealty.com left intact
<RETS ReplyCode="20037" ReplyText="User Agent not registered or
denied. Reference: 05cf848c-f16a-49b3-b1bd-27b5e9b3c8ea" />
* Closing connection #0
So, before connect() try:
$rets->SetParam('use_interealty_ua_auth', true);
If that doesn't work, check with your contact again and make sure the
server doesn't also want a user agent password. So that would be 4 things
total, username, password, UA and UA password.
Hopefully the setparam() call will do the trick...
-t
> --
> You received this message because you are subscribed to the Google Groups "PHRETS" group.
> To post to this group, send email to phr...@googlegroups.com.
> To unsubscribe from this group, send email to phrets+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phrets?hl=en.
>
The server admin said there was no password required, so I'm going to
email him again and see if he can double check the info he gave me.
thanks for all your help!
thanks again!
Angelina, I managed to solve my issue thanks to your post here. Thanks!unrelated perhaps.. but I'm working with the same board, and I"m having issue getting the properties spitting out.
$search = $rets->SearchQuery("Property", 'Residential/Condominium', '(ListDate=2012-03-05-2012-03-08)', array('Limit' => 5));I tried RES, 1, or Residential/Condominium for the property type name field.. still no dice.