PHP Classes

Filter Class: Filter to prevent XSS, SQL injection, CSRF attacks

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 55%Total: 1,861 All time: 2,115 This week: 173Up
Version License PHP version Categories
filter-class 1.1Free For Educatio...4.0PHP 5, Validation, Security
Description Author

This package can filter values to prevent XSS, SQL injection, CSRF security attacks.

The main class can filter one value or an array of values by stripping HTML tags, adding slashes and escaping HTML entities.

Another class can prevent Cross-Site Request Forgery attacks by generating a secret token to be passed in forms, so it can verified later to avoid forms submitted by JavaScript code that executes automatically from other site pages.

Picture of Kumar Saurabh Sinha
  Performance   Level  
Name: Kumar Saurabh Sinha <contact>
Classes: 1 package by
Country: India India
Age: 34
All time rank: 157690 in India India
Week rank: 515 Up37 in India India Up

  Files folder image Files  
File Role Description
Plain text file FilterClass.php Class This class manages the data filteration for XSS and SQL Injection
Plain text file RestrictCSRF.php Class This is the RestrictCSRF Class
Accessible without login Plain text file usage_csrf.txt Doc. Readme for CSRF
Accessible without login Plain text file usage_filter_class.txt Doc. Readme for Filterclass

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,115
This week:173Up
User Ratings User Comments (4)
 All time
This class helped me to understand the security measures for ...
8 years ago (Manish)
9 years ago (Rahul Shambharkar)
I m too good to find this code.
9 years ago (Aneesh Khan)
The code was precise and useful.
9 years ago (Richa Parihar)
For more information send a message to info at phpclasses dot org.