Location: PHPKode > scripts > MSNStatus > msnstatus/MSNStatus_Cron.php
<?

//=============================//
//                             //
//   MSNStatus v0.2            //
//   MSNStatus Cron Job Bot    //
//   MSNStatus_Cron.php        //
//   by Stanga Razvan          //
//   hide@address.com   //
//   http://www.phprebel.org   //
//                             //
//       MADE IN ROMANIA       //
//                             //
//=============================//

error_reporting  (E_ERROR | E_WARNING | E_PARSE);

@set_time_limit(60);

ignore_user_abort(true);

//---------------
// Include Config
//---------------

require ("includes/MSNStatus.Config.php");

//------------------------
// Include MSNStatus Class
//------------------------

require ("includes/MSNStatus.Class.php");

//-----------------------
// Include Cron Job Class
//-----------------------

require ("includes/MSNStatus.Cron.php");

//--------------------
// Start MSNStatusCron
//--------------------

$MSNStatusCron = new MSNStatusCron;

//-----------------
// Start Time Cache
//-----------------

$time_cache = array ();

if (file_exists ("includes/_time/".$config['checkemail'].".php")) {
  require ("includes/_time/".$config['checkemail'].".php");
}

$time_temp = time ();

if ( $time_cache[ $config['checkemail'] ] <= $time_temp ) {

$time_cache[ $config['checkemail'] ] = $time_temp + $config['cronjob'];

//-----------------
// Writing new time
//-----------------

$MSNStatusCron->do_write ($time_cache, $config['checkemail']);

//----------------
// Start MSNStatus
//----------------

$MSNStatus = new MSNStatus;

$MSNStatus->config = $config;

$MSNStatus->debuglog ('----- '.date("Y-m-d H:i:s", time()).' -----', 1);

$MSNStatus->connect($config['msnhost'], $config['msnport']);

}

// End Cache

?>
Return current item: MSNStatus