Login   Register  
PHP Classes

PHP CSRF Protection: Generate and validate tokens against CSRF attacks

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-06-21 (6 months ago) RSS 2.0 feedNot enough user ratingsTotal: 372 This week: 1All time: 6,115 This week: 1,398Up
Version License PHP version Categories  
php-csrf 1.0GNU General Public Lice...5.0PHP 5, Validation, Security
Description Author  

This class can generate and validate tokens against CSRF attacks.

It creates a random token based on the current user IP address, browser identification.

The generated token is stored in a session variable that may include the name of the form on which the token will be used.

The class can also validate the generated token passed via a form field or a link parameter to verify if it matches the token stored in the session variable.

Picture of Radovan Janjic
Name: Radovan Janjic is available for providing paid consulting. Contact Radovan Janjic .
Classes: 14 packages by
Country: Serbia Serbia
Age: 26
All time rank: 4004 in Serbia Serbia
Week rank: 38 Up1 in Serbia Serbia Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file CSRF.class.php Class Class source
Accessible without login Plain text file example.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%Total:372All time:6,115
 This week:1This week:1,398Up