<?php include_once "includes/config.inc"; include_once "includes/util.inc"; include_once "includes/jdremote.api.inc"; include_once "includes/sources.api.inc"; include_once "includes/datafile.api.inc"; if (!jdremote_init()) { dlog(dout("JDRemote not reachable. Aborting.")); die; } dout("Loading data..."); $sites = datafile_read('data/sites'); $hosts = datafile_read('data/hosts'); dout("Loading link cache..."); if (is_readable('data/cache')) { $link_cache = unserialize(file_get_contents('data/cache')); } else { $link_cache = array('_threads' => array()); } $link_cache['_threads'] = array(); foreach ($sites as &$site) { if (!is_array($site)) { continue; } foreach ($site['threads'] as $thread) { if (!is_array($thread)) { continue; } $link_cache['_threads'][$thread['url']]['last_scan'] = time(); }
<?php include_once "includes/config.inc"; include_once "includes/util.inc"; include_once "includes/jdremote.api.inc"; include_once "includes/sources.api.inc"; include_once "includes/datafile.api.inc"; include_once "includes/templates.api.inc"; include_once "includes/interface.api.inc"; global $SITES, $HOSTS, $LINK_CACHE; jdremote_init(); $SITES = datafile_read('data/sites'); $HOSTS = datafile_read('data/hosts'); if (is_readable('data/cache')) { $LINK_CACHE = unserialize(file_get_contents('data/cache')); } else { $LINK_CACHE = array(); } $CONFIG['verbose'] = false; interface_set_baseurl($_SERVER['PHP_SELF']); interface_set_default("overview"); interface_exec($_GET['page'], $_GET['action']); file_put_contents('data/cache', serialize($LINK_CACHE)); datafile_write($SITES); datafile_write($HOSTS);