PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tiago Night  >  secShield  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Main usage
Class: secShield
Encrypt parameters passed between pages
Author: By
Last change:
Date: 7 years ago
Size: 1,099 bytes
 

Contents

Class file image Download
<?PHP

include('secShield.class.php');

//Instance the secShield Class
//You might put it at the top of your PHP code

 
$secShield = new secShield;

//Control the acess to the website preventing url injections. MAX_QUERY_ERROR = 10;
//The Function AcessControl will return false if the user got the maximum query error number.
//The information is stored in sessions and cookies.

 
if(!$secShield->AcessControl()) {

     echo
'<H3>User Banned !</H3>';
     echo
'IP: '. $secShield->secShield_IP . '<br />';
     echo
'Ban-TimeStamp: '. $secShield->secShield_TS . '<br />';
     echo
'<B>Banned for 1 day.</B>';


     Exit();

  } else {

     echo
'welcome';

  }


//Return an Array with the url query as key and values

 
$array_query = $secShield->getQuery();

//Example Printing the array query

 
echo '<pre>';
 
print_r($array_query);
  echo
'</pre>';

?>

<br />
<br />
<br />
<a href="index.php?secShield=<?PHP echo $secShield->setQuery('class=secShield&developer=Tiago Sarlo&Age=25&Email=tiagosarlo@proged.com.br'); ?>">secShield Testing</a>