Login   Register  
PHP Classes
elePHPant
Icontem

File: codered.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Felix-Gabriel Gangu  >  CCodeRed  >  codered.php  >  Download  
File: codered.php
Role: ???
Content type: text/plain
Description: Example file for using CCodeRed
Class: CCodeRed
Author: By
Last change:
Date: 13 years ago
Size: 1,082 bytes
 

Contents

Class file image Download
<?
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)
?>