<?php
include('ipblocker.php');
/* This is a sample code on how the class can be used */
$ipBlock = new IPBlocker($_SERVER['REMOTE_ADDR']); //Create object
$ipBlock->denyIPAddress = '127.0.0.1'; //Block single IP address
$ipBlock->denyIPAddresses = array($_SERVER['REMOTE_ADDR'], '127.0.0.254'); //Block multiple IP addresses
$ipBlock->beginRange = '127.0.0.1'; //Block IP range
$ipBlock->endRange = '127.0.0.254'; //Block IP range
$ipBlock->logBlocking = true; //Log blocking
$ipBlock->fileName = 'block.txt'; //Save blocking into this file
$ipBlock->start_blocking(); //Start blocking
?>
|