Login   Register  
PHP Classes
elePHPant
Icontem

File: MSNStatus_Cron.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stanga Razvan  >  MSNStatus  >  MSNStatus_Cron.php  >  Download  
File: MSNStatus_Cron.php
Role: Example script
Content type: text/plain
Description: cron
Class: MSNStatus
Retrieve the status of MSN account
Author: By
Last change: minor updates
Date: 2003-10-23 08:25
Size: 1,821 bytes
 

Contents

Class file image Download
<?

//=============================//
//                             //
//   MSNStatus v0.2            //
//   MSNStatus Cron Job Bot    //
//   MSNStatus_Cron.php        //
//   by Stanga Razvan          //
//   razvan_stanga@yahoo.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

?>