我试图使用PHRETS从RETS服务器提取一些基本的细节,但是得到了这个错误
[*Uncaught Error: Call to undefined method PHRETS\Session::SearchQuery() in D:\Software\XAMPP\htdocs\PHRETS-master\RetsExtract.php:21 Stack trace: #0 {main} thrown in D:\Software\XAMPP\htdocs\PHRETS-master\RetsExtract.php on line 21*]似乎不能理解是什么导致了这一切。
因此,基于retsmd.com,我将属性作为资源,将其作为类列出,基于这两个资源,我认为可以使用SearchQuery()方法提取数据。
我对PHP和RETS环境比较陌生,但下面是代码的一部分:
<?php
require_once("vendor/autoload.php");
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://matrixrets.crebtools.com/rets/Login.ashx');
$config->setUsername('userName');
$config->setPassword('pwdHere');
// optional. value shown below are the defaults used when not overridden
$config->setRetsVersion('1.8'); // see constants from \PHRETS\Versions\RETSVersion
$config->setUserAgent('agenUsr/1.0');
$config->setUserAgentPassword('pwdHere'); // string password, if given
$config->setHttpAuthenticationMethod('digest'); // or 'basic' if required
$config->setOption('use_post_method', false); // boolean
$config->setOption('disable_follow_location', false); // boolean
$rets = new \PHRETS\Session($config);
$bulletin = $rets->Login();
$search = $rets->SearchQuery("Property", "Listing", "(ListDate=1990-01-01+)");
?>我正在使用PHRETS的GitHub代码库中的这一部分。你知道问题出在哪里吗?
谢谢
https://stackoverflow.com/questions/51314165
复制相似问题