<?
//=============================//
// //
// PHPDc v0.2 //
// PHPDc Cron Job Bot //
// PHPDc_Cron.php //
// by [RO]VeNoM //
// razvan_stanga@yahoo.com //
// //
// MADE IN ROMANIA //
// //
//=============================//
error_reporting (E_ERROR | E_WARNING | E_PARSE);
@set_time_limit(0);
//---------------
// Include Config
//---------------
require ("includes/PHPDc.Config.php");
//--------------------
// Include PHPDC Class
//--------------------
require ("includes/PHPDc.Class.php");
//-----------------------
// Include Cron Job Class
//-----------------------
require ("includes/PHPDc.Cron.php");
//----------------
// Start PHPDcCron
//----------------
$PHPDcCron = new PHPDcCron;
//-----------------
// Start Time Cache
//-----------------
$time_cache = array ();
require ("html/time_cache.php");
$dowrite = 0;
$time_temp = time ();
if ( $time_cache[ $config['cronjob'] ] <= $time_temp ) {
$time_cache[ $config['cronjob'] ] = $time_temp + $config['cronjob'];
// Writing new time
$PHPDcCron->do_write ($time_cache);
foreach ($hub as $k => $v) {
//------------
// Start PHPDc
//------------
$PHPDc = new PHPDc;
$config['hub'] = $v['hub'];
$config['port'] = $v['port'];
$config['name'] = $v['name'];
$config['desc'] = $v['desc'];
$config['template'] = $v['template'];
$config['time'] = time ();
$PHPDc->config = $config;
$PHPDc->hub = $hub;
$PHPDc->debuglog ('----- '.date("Y-m-d H:i:s").' -----');
$PHPDc->connect($config['hub'], $config['port']);
$PHPDc->listen ();
}
}
// End Cache
?>
|