Login   Register  
PHP Classes
elePHPant
Icontem

File: examples.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2013-10-15 09:43
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);   
}
?>