Ask Your Question

Revision history [back]

using PHRETS, getting "cURL error 51" on all Paragon MLSes

I'm trying to use the PHRETS library to access mls listings, and am running into a snag. Our current system uses cURL directly through (mostly) perl scripts, and doesn't have this problem. (direct cURL calls, mostly through perl scripts)

Specifically, during the PHRETS login process, I'm getting an error "cURL error 51: SSL: no alternative certificate subject name matches target host name 'amador.rets.paragonrels.com" when using my credentials for the Amador mls:

Login CMD: https://amador.rets.paragonrels.com/rets/fnisrets.aspx/AMADOR/login?rets-version=rets/1.5 username/password using Basic Authentication (I have tried both ways)

My code looks like: $rets_config = new \PHRETS\Configuration; $rets_config->setLoginUrl( $mls_rets_info['dl_rets_login_cmd'] ) ->setUsername( $mls_rets_info['dl_data_user'] ) ->setPassword( $mls_rets_info['dl_data_pass'] ) ->setHttpAuthenticationMethod( \PHRETS\Configuration::AUTH_BASIC );

            $rets = new \PHRETS\Session($rets_config);
            $connect = $rets->Login();

at which point the exception is thrown. I also tried using RETS MD with our credentials, but that fails as well. So making the calls directly with cURL works, but the PHRETS versions don't.

Any ideas?

Thanks