Login   Register  
PHP Classes
elePHPant
Icontem

File: nimda.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  >  CNimda  >  nimda.php  >  Download  
File: nimda.php
Role: ???
Content type: text/plain
Description: Example file for using CNimda
Class: CNimda
Author: By
Last change:
Date: 2001-09-20 04:56
Size: 1,058 bytes
 

Contents

Class file image Download
<?
require("cnimda.inc.php");

// Syntax: CNimda($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 Nimda-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):
//									$oNimda->GetResultArray();
//
//									To get the number of total suspect lines of your log:
//									$oNimda->GetGetNumNimdaRequests()
//
//                  To make the Javascript Page-Refresh code only:
//									$oNimda->GetRefreshJavaScript()

$oNimda=new CNimda("/etc/httpd/logs/access",2000,5);

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

// print_r($oNimda->GetResultArray()); // Get the result array only (for own designs)
?>