Login   Register  
PHP Classes
elePHPant
Icontem

File: example_3.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Todor Iliev  >  Defensive Attack  >  example_3.php  >  Download  
File: example_3.php
Role: Example script
Content type: text/plain
Description: Check referer.
Class: Defensive Attack
Retrieve information of current user HTTP request
Author: By
Last change:
Date: 2006-11-01 08:21
Size: 697 bytes
 

Contents

Class file image Download
<?php
/**
 * File containing example 3(check referer) use DefensiveAttack.
 *
 * @package     DefensiveAttack
 * @version     1.0.0
 * @copyright     Copyright (C)2006 TheLordOfWeb. All rights reserved.
 * @license     http://www.gnu.org/copyleft/gpl.html GNU Public License
 * @filesource
 */

//Load class
//require("class.php4.DefensiveAttack.php");
require("class.php5.DefensiveAttack.php");

//Create object
$def_attack     =   new DefensiveAttack("mysite.com");

//Check referer if I do not want direct access to my site
if (false === $def_attack->CheckReferer()) {
    print 
"Access deny " '<a href="example_3.php" >Use link</a>';
} else {
    print 
"Access allow";
}


?>