Location: PHPKode > scripts > CCodeRed > ccodered/codered.php
<?
require("ccodered.inc.php");

// Syntax: CCodeRed($cLogFile,$iRefresh,$iLines);
// 
// Hints: 					Object Creation:
//
// 									$cLogFile is your (Apache) Logfile
// 									$iRefresh is the RefreshTime (ms), only if JavaSript is activated
// 									$iLines is the number of last CodeRed-atemmpts on your server
//									
//									Methods:
//
//									To show a clear result page (with Javascript Refresh TRUE|FALSE):
//									$oNimda->ShowPage($bShowJavascript) 
//
//									To get only the result array (with the suspect lines):
//									$cCodeRed->GetResultArray();
//
//									To get the number of total suspect lines of your log:
//									$cCodeRed->GetNumCodeRedRequests()
//
//                  To make the Javascript Page-Refresh code only:
//									$cCodeRed->GetRefreshJavaScript()

$oCodeRed=new CCodeRed("/etc/httpd/logs/access",2000,5);

echo $oCodeRed->ShowPage(TRUE); // Show the results (with Javascript refresh)

// print_r($cCodeRed->GetResultArray()); // Get the result array only (for own designs)
?>
 
Return current item: CCodeRed