Group: http://groups.google.com/group/phrets/topics
- Connection Error to new RETS server [3 Updates]
angelina_zooma <an...@trundlemedia.com> Dec 10 05:30PM -0800
The board my client is with is changing their RETS server and they
have set me up with an account there. I swapped out the login
credentials for the new ones and now my scripts aren't working.
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 #0Troy Arnold <tr...@zenux.net> Dec 10 07:05PM -0800
On Sat, Dec 10, 2011 at 05:30:34PM -0800, angelina_zooma wrote:
> <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');angelina_zooma <an...@trundlemedia.com> Dec 10 08:55PM -0800
Thanks Troy, but no dice :(
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
On Dec 10, 10:05 pm, Troy Arnold <t...@zenux.net> wrote:You received this message because you are subscribed to the Google Group phrets.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
--
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.
I'm pretty sure I've captured the correct thing but I'll be honest
with you, I don't really know what I'm looking at here. I'm a web
designer first, programmer second :)
According to what I'm looking at, the User-Agent when I run the php
script in my browser is:
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101
Firefox/8.0\r\n
and when I run the RETSConnector it is
User-Agent: RETSConnector/1.0\r\n
which makes sense.. the user-agent is header sent by the program
making the request.. So with the line
$rets->AddHeader("User-Agent", $rets_user_agent);
am I attempting to change that header so it looks like a different
program, one which has been allowed by the rets server, is trying to
access it?
(sorry for the complete newbness of these questions!)
> > Troy Arnold <t...@zenux.net> Dec 10 07:05PM -0800