PHP Classes

File: sIPb_Sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Uwe Stein  >  sIPb  >  sIPb_Sample.php  >  Download  
File: sIPb_Sample.php
Role: Example script
Content type: text/plain
Description: Demo file part 1
Class: sIPb
Block the IP address of undesired HTTP clients
Author: By
Last change:
Date: 10 years ago
Size: 1,047 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">


<div align="center">
<h2>This is a small demo of sIPb</h2>

$ip = new sIPb;

if (isset(
$_GET["blockme"])) {
// block the ip during the next 10 seconds
<h2>Now your IP is blocked for 10 seconds.<br>
       <A href="./sIPb_SamplePart2.php"> Klick here </A> during this
       time, to test sIPb without redirection<br>
       or <A href="sIPb_SamplePart3.php">here</A>
        to test sIPb with redirection
        <form >
           <input type="button" value = "Back" onclick="history.back()">
 else {

<h3>If you klick the button &#034;Block me&#034; your IP is blocked for 10 seconds</h3>

<form method="get" action="<?php echo $_SERVER["PHP_SELF"];?>">
   <INPUT type="submit" name="blockme" value="Block me">
} ?>