Source for file example_3.php

Documentation is available at example_3.php

  1. <?php
  2. /**
  3.  * File containing example 3(check referer) use DefensiveAttack.
  4.  *
  5.  * @package     DefensiveAttack
  6.  * @version     1.0.0
  7.  * @copyright     Copyright (C)2006 TheLordOfWeb. All rights reserved.
  8.  * @license     http://www.gnu.org/copyleft/gpl.html GNU Public License
  9.  * @filesource
  10.  */
  11.  
  12. //Load class
  13. //require("class.php4.DefensiveAttack.php");
  14.  
  15. require("class.php5.DefensiveAttack.php");
  16.  
  17. //Create object
  18. $def_attack     =   new DefensiveAttack("mysite.com");
  19.  
  20. //Check referer if I do not want direct access to my site
  21. if (false === $def_attack->CheckReferer()) {
  22.     print "Access deny " '<a href="example_3.php" >Use link</a>';
  23. else {
  24.     print "Access allow";
  25. }
  26.  
  27.  
  28. ?>

Documentation generated on Tue, 31 Oct 2006 23:59:59 +0200 by phpDocumentor 1.3.1