| Server IP : 104.21.17.213 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/corbizre/gotofindhomes.com/cron/ |
Upload File : |
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
$time_limit = 86400; // 1 day
$AppFolder = dirname(__FILE__).'/..';
try{
$ComponentsPath = array($AppFolder.'/components');
$BaseUrl = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
/** setup path components */
foreach ($ComponentsPath as $Path) {
set_include_path(ini_get('include_path') . PATH_SEPARATOR. $Path);
}
if (version_compare(PHP_VERSION, '7.0.0') < 0) {
exit("PHP version >= 7.0");
}
require $AppFolder . '/vendor/autoload.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('System');
$autoloader->setFallbackAutoloader(true);
$autoloaderSystem = new System_Autoloader();
$autoloader->pushAutoloader($autoloaderSystem, 'System');
$autoloader->pushAutoloader($autoloaderSystem, 'Image');
$autoloader->pushAutoloader($autoloaderSystem, 'User');
$autoloader->pushAutoloader($autoloaderSystem, 'LogSystem');
$autoloader->pushAutoloader($autoloaderSystem, 'Settings');
$autoloader->pushAutoloader($autoloaderSystem, 'RealEstate');
$autoloader->pushAutoloader($autoloaderSystem, 'Address');
Zend_Registry::set('AppFolder', $AppFolder);
Zend_Registry::set('ComponentsPath', $ComponentsPath);
Zend_Registry::set('baseUrl', $BaseUrl);
System_Application::getInstance()->init();
$cfgImport = System_Components::getComponentConfig('Import');
$objClient = new MongoDB\Client('mongodb://' . $cfgImport->mongodb->host . ':' . $cfgImport->mongodb->port);
$objDb = $objClient->{$cfgImport->mongodb->database};
$objCollectionLicensees = $objDb->__get('licensees');
$objCursorAgents = $objCollectionLicensees->find(
array('$or' => array(
array('city' => array('$exists' => false)),
array('state' => array('$exists' => false))
))
);
$clsMongoAgents = new RealEstate_Agent_Mongo();
foreach ($objCursorAgents as $currAgent) {
$objAgent = new RealEstate_Agent_Row();
$objAgent->fillDataFromArray($currAgent);
$clsMongoAgents->detectLocation($objAgent);
}
}catch (Exception $exception){
if (!System_Controller::getInstance()->getConfig()->throwExceptions)
{
$log = new Zend_Log(
new Zend_Log_Writer_Stream(
Zend_Registry::get('AppFolder') . '/logs/error.log'
)
);
$log->emerg('DETECT-MONGOAGENT-LOCATION.php ERROR: ' . $exception->getMessage() . "\n" .
$exception->getTraceAsString());
}else{
echo 'System Application Run Exception:';
echo '<pre>';
echo "Caught exception: " . get_class($exception) . "\n";
echo "Message: " . $exception->getMessage() . "\n";
echo $exception->getTraceAsString() . "\n";
echo '</pre>';
}
}