Closed masha-andreeva closed 9 years ago
When setting up $config
, throw in a:
->setHttpAuthenticationMethod(\PHRETS\Configuration::AUTH_BASIC)
and see if that fixes it.
With version 1, did you have to specifically set any user-agent headers?
You may also need to:
->setRetsVersion(1.8)
troydavisson: With version 1, did you have to specifically set any user-agent headers? No
Unfortunately this ->setHttpAuthenticationMethod(\PHRETS\Configuration::AUTH_BASIC) ->setRetsVersion(1.8) doesn't help
Having the same issue. @masha-andreeva have you been able to resolve this? The same connection information entered in retsmd.com seems to work without issue, so there seems to be a difference in how the connection is set up.
No yet. I am thinking to try use an another library to check where is an issue.
I fixed it by adding cookie before curl invoking
$tmpfname = tempnam('/tmp', 'file-cookies'); curl_setopt($handle, CURLOPT_COOKIEJAR, $tmpfname); curl_setopt($handle, CURLOPT_COOKIEFILE, $tmpfname);
Hi, I have YII1 application where i used an old version of PHRETS. My RETS provider URL is https://rets.crmls.org/contact/rets/login But they changed API (They are using RETS 1.8 specification) and there was a need to upgrade version. After upgrading PHRETS i stop to Login. Each time return:
Client error response [url] https://rets.crmls.org/contact/rets/login [status code] 401 [reason phrase] Unauthorized
Part of source: $config = new \PHRETS\Configuration; $config->setLoginUrl($loginUrl) ->setUsername($userName) ->setPassword($password) ; $rets = new \PHRETS\Session($config); $connect = $rets->Login();