Login   Register  
PHP Classes
elePHPant
Icontem

File: usage_filter_class.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kumar Saurabh Sinha  >  Filter Class  >  usage_filter_class.txt  >  Download  
File: usage_filter_class.txt
Role: Documentation
Content type: text/plain
Description: Readme for Filterclass
Class: Filter Class
Filter to prevent XSS, SQL injection, CSRF attacks
Author: By
Last change:
Date: 1 year ago
Size: 736 bytes
 

Contents

Class file image Download
Usage for FilterClass
----------------------------------------

1. For Filtering a Single value

	$objString = Nimbuzz_FilterClass::prepareDataObject($valueToFilter, $filterArray);
	$finalValue = Nimbuzz_FilterClass::filterDataValue($objString);
	
	In Above
	a. $valueToFilter: Teh value which can to be filtered
	b. $filterArray: operation to be performed on the string
					eg: $filterArray = array('strip_tags' => array(), 'addslashes' => array());
					
					
2. For Filtering the complte array
	$resultArray = Nimbuzz_FilterClass::filterXSS($arrayToFilter);
	
	In Above: 
	$arrayToFilter: This is the array to be filtered ($_POST, $_GET, $_REQUEST, or any array with values);
	
	Note: This is only to filter XSS