Location: PHPKode > scripts > YahooStatus > yahoostatus/includes/YahooStatus.Cron.php
<?

//=============================//
//                             //
//   YahooStatus v0.1          //
//   YahooStatus Cron Job file //
//   YahooStatus.Cron.php      //
//   by Stanga Razvan          //
//   hide@address.com   //
//   http://venom.gent00.org   //
//                             //
//       MADE IN ROMANIA       //
//                             //
//=============================//

class YahooStatusCron {

//---------
// Cron Job
//---------

function do_write ($time_cache, $file) {
    global $config;

        ksort ($time_cache);

		$file_data = "<?\r\n";
		
		foreach( $time_cache as $t => $c )
		{
			$file_data .= '$time_cache['."'".$t."'".']'."\t=\t'".$c."';\r\n";	
		}
		
		$file_data .= "".'?'.'>';

        $this->writetofile ("includes/_time/".$file.".php", $file_data);

}

//-------------------
// Start Write 2 File
//-------------------

function writetofile ($path,$data,$backup=0) {

  if (file_exists($path)!=0) {
    if ($backup==1) {
      $filenamenew=$path."venom";

      rename ($path,$filenamenew);
    } else {
      unlink($path);
    }
  }

  if ($data!="") {

    $filenum=fopen($path,"w");

    fwrite($filenum,$data);

    fclose($filenum);

  }

}

}

?>
Return current item: YahooStatus