Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Hamed Afshar  >  PHP Intrusion Detection System  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Sample usage
Class: PHP Intrusion Detection System
Analyze request input to prevent security attacks
Author: By
Last change:
Date: 2013-10-03 04:38
Size: 681 bytes
 

Contents

Class file image Download
<?php
require("HF_IDS.class.php");
$ids=HF_IDS::getInstance();

//This method can be used to secure any content. In this example, < will be replaced by &lt;
//Actually, this method will secure the input using mysql_real_escape_string and htmlentities
echo $ids->secureData("a <");

//This method will read "param1" from $_REQUEST and will secure it using $ids->secureData method
echo $ids->readParam("param1");

//This method will read "param1" from $_GET and will secure it using $ids->secureData method
echo $ids->readGET("param1");

//This method will read "param1" from $_POST and will secure it using $ids->secureData method
echo $ids->readPOST("param1");

?>