Connection Error

64 views
Skip to first unread message

Zain

unread,
Dec 22, 2009, 2:55:30 AM12/22/09
to PHRETS
Hi,

I'm just starting to use this class.
I'm using following code to connect to RETS-FBS System.

This URL is provided to me by the ARMLS RETS Support:
http://retsgw.flexmls.com:6103/rets2_0/Login

require_once('phRETS.php');

$rets = new phRETS;

$rets->AddHeader("Accept", "*/*");
$rets->AddHeader("RETS-Version", "RETS/1.5");
$rets->AddHeader("User-Agent", "RETSConnector/1.0");
$rets->SetParam("cookie_file", "phrets_cookies.txt");
$rets->SetParam("debug_mode", TRUE); // ends up in rets_debug.txt
$rets->SetParam("force_basic_authentication", true);
$rets->Connect("http://retsgw.flexmls.com:6103/rets2_0/
Login","*********", "********");

$active_home_results = $rets->Search("Property", "RE_1",
"(L_Status=|1_0,1_1,1_2,1_3,1_4,1_5,1_6,1_7,1_8)", array('Limit' =>
100,
'Select' => 'L_ListingID,L_Status') );

print_r($active_home_results);

$myFile4 = "db_retrieved_data.txt";
$fh2 = fopen($myFile4, 'w') or die("can't open file");
foreach($active_home_results as $l){
$myok .= $l[L_ListingID].",".$l[L_Status]."\r\n";
}

fwrite($fh2, $myok);
fclose($fh2);
$rets->Disconnect();

It's taking lot of time & in the end I get this error displayed on the
browser:
Search() called but unable to find Search location. Failed login?

If anyone please help me connecting to that server so I can get
listings.

This is I got in rets_debug.txt file:
* About to connect() to retsgw.flexmls.com port 6103
* Trying 64.21.238.171... * Connection timed out
* Closing connection #0


Please help.
Thanks in advance.

Troy Davisson

unread,
Dec 22, 2009, 12:54:11 PM12/22/09
to phr...@googlegroups.com
Change your login URL to:

http://retsgw.flexmls.com/rets2_0/Login

That should get you in.  Sounds like a firewall on your end is blocking the connection.

(Sorry about the late posting.... I'm moderating messages from new members now to help reduce spam)





--

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.



Zain

unread,
Dec 23, 2009, 3:14:24 AM12/23/09
to PHRETS
Thanks Troy for reply.

Still no luck. Now I get the response very quickly but response is
same:


Search() called but unable to find Search location. Failed login?

What can be the problem?
Can I get a test server to get connect ?

> > phrets+un...@googlegroups.com<phrets%2Bunsu...@googlegroups.com>

Troy Davisson

unread,
Dec 24, 2009, 3:34:58 PM12/24/09
to phr...@googlegroups.com
Put this after your Connect() line.  I suspect it's erroring on the login now rather than having a connection issue:

print_r($rets->Error());




To unsubscribe from this group, send email to phrets+un...@googlegroups.com.

Dusko O

unread,
Feb 8, 2010, 4:29:00 PM2/8/10
to phr...@googlegroups.com
Zain, when it comes to issues such as yours, Wireshark is your friend.
http://www.wireshark.org/download.html
Reply all
Reply to author
Forward
0 new messages