PHP Classes

File: yourpage.php

Recommend this page to a friend!
  Classes of Hugo Sousa   PHProtector   yourpage.php   Download  
File: yourpage.php
Role: Example script
Content type: text/plain
Description: simple example of usage of the library
Class: PHProtector
Analyse HTTP requests to detect security attacks
Author: By
Last change: update
Date: 13 years ago
Size: 753 bytes
 

Contents

Class file image Download
<?php
   
   
//START PhProtector//
       
        //include the class file
       
require("phprotector/PhProtector.php");
           
       
/* TESTING environment (show all PHP errors!) */
       
$prot= new PhProtector("phprotector/log.xml", true);
           
       
/* FINAL environment (do not show PHP errors!) */
        //$prot = new PhProtector("phprotector/log.xml", false);
       
       
if($prot->isMalicious()){
           
header("location: index.html"); //if an atack is found, it will be redirected to this page :)
           
die();
        }
       
   
//END PhProtector// /



        //THE REST OF YOUR PHP CODE GOES HERE!
       
print("dummy code");
       
       
//THE REST OF YOUR PHP CODE GOES HERE!
       
        //THE REST OF YOUR PHP CODE GOES HERE!
       
        //THE REST OF YOUR PHP CODE GOES HERE!

?>