PHP Classes

File: examples.php

Recommend this page to a friend!
  Classes of Oliver Leuyim Angel   PHP Antihack Environment   examples.php   Download  
File: examples.php
Role: Example script
Content type: text/plain
Description: Example for use this class
Class: PHP Antihack Environment
Check request values to detect hacking attempts
Author: By
Last change: dettect spider
Date: 11 years ago
Size: 695 bytes
 

Contents

Class file image Download
<?php
require('class.antihack.php');

$anti = new Sec_Hack_Dettecter();
$adminMAIL = 'anymailforcontact@domain.com';

if(
$anti->detect_hack(NULL,'SPIDER') == true or $anti->detect_hack($anti->curPageURL()) == true){
        die(
'U are banned, contact: '.$adminMAIL);
}

if(
$anti->detect_hack(NULL,'POST') == true or $anti->detect_hack(NULL,'COOKIE') == true or $anti->detect_hack(NULL,'QUERY') == true){
        die(
'U are banned, contact: '.$adminMAIL);
}

if(
$anti->detect_hack(NULL,'FILES') == true){
        die(
'U are banned, contact: '.$adminMAIL);
}

if(
$anti->detect_hack($_SESSION) == true){
        die(
'U are banned, contact: '.$adminMAIL);
}
?>