Phrets sold data not downloading images seems to time out

88 Views Asked by At

I didn't install this but I am trying to support it.

on this site https://www.steinerranchinfo.com/sold-listing/

The script seams to work and then it just stops half way down the page. I don't know why the images stop downloading. This according to the agent works great in the past but just ended up not working. In reading the doc. Tom says that there is always going to something that needs fixing. Is there anyone that could take this part of the site over? or coach me on what to do.

How does this get the new information is this via cron job? (see I don't even know that)

<pre>
<?php

date_default_timezone_set('America/New_York');

require_once("vendor/autoload.php");

$config = new \PHRETS\Configuration;
$config->setLoginUrl('https://matrixrets.abor.com/rets/login.ashx')
        ->setUsername('****')
        ->setPassword('*****')
        ->setRetsVersion('1.7.2');

$rets = new \PHRETS\Session($config);

// If you're using Monolog already for logging, you can pass that logging instance to PHRETS for some additional
// insight into what PHRETS is doing.
//
// $log = new \Monolog\Logger('PHRETS');
// $log->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG));
// $rets->setLogger($log);

$connect = $rets->Login();

$classes = $rets->GetClassesMetadata('Property');
var_dump($classes->first());

$fields = $rets->GetTableMetadata('Property', 'RESI');

//$objects = $rets->GetObject('Property', 'Photo', '00-1669', '*', 1);
//var_dump($objects);

$objects = $rets->GetObject('Property', 'Photo', '00-14669', '*', 1);
var_dump($objects);

foreach ($fields as $record) {
    //echo $record['Address'] . "\n";
    // is the same as:
    echo $record->get('Matrix_Unique_ID') . "\n";
}

Here is the index above, we also just got an email from the mls that they are switching to RESO away from Rets will this script still work with that?

1

There are 1 best solutions below

0
On

That code won't work with RESO WebAPI standard. So you should change the codes and make it compatible with RESO WebAPI standard. Briefly, WebAPI works based on Restful and Odata standards.