(PHP) NoCSRF, a simple class to prevent CSRF attacks.
By Thibaut Despoulain, posted Oct 25, 2011 in Code

When building an application or a website using PHP, you should be concerned with security.
One of the most common attacks used by malicious hackers is the Cross-Site Request Forgery (CSRF). This simple anti-CSRF token generation/checking class written in PHP5 will protect your form handlers from being hijacked to run unexpected actions.