Login   Register  
PHP Classes
elePHPant
Icontem

File: example_en.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Murat Atay  >  FloodDam  >  example_en.php  >  Download  
File: example_en.php
Role: Example script
Content type: text/plain
Description: English Example Page
Class: FloodDam
Protect a site against abusive number of accesses
Author: By
Last change:
Date: 2005-07-29 09:46
Size: 708 bytes
 

Contents

Class file image Download
<?php require('flooddam.php'); ?>
<?php
$flooddam 
= new flooddam();
?>
FloodDam Demo<br>
<br>
You are connected this demo from <b><?=$flooddam->client_ip;?></b> IP number.<br>
<br>
<?php if (empty($flooddam->client_seconds)) { ?>
You are not reached the maksimum request number <b><?=$flooddam->hits;?></b> yet.
<?php } else { ?>
Time between your last <b><?=$flooddam->hits;?></b> requests is <b><?=$flooddam->client_seconds;?></b> seconds.<br>
Average time between your last <b><?=$flooddam->hits;?></b> requests is <b><?=$flooddam->client_average;?></b> seconds.<br>
<br>
If you pass the minimum time value of <b><?=$flooddam->seconds;?></b> seconds than your IP will be blocked.
<?php ?>