<?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";
}
?>
|