PHP Classes

File: example_en.php

Recommend this page to a friend!
  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: 18 years ago
Size: 708 bytes


Class file image Download
<?php require('flooddam.php'); ?>
= new flooddam();
FloodDam Demo<br>
You are connected this demo from <b><?=$flooddam->client_ip;?></b> IP number.<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>
If you pass the minimum time value of <b><?=$flooddam->seconds;?></b> seconds than your IP will be blocked.
<?php } ?>