PHP: Location header bypassing

Published on

There’s a trick where you can bypass Location headers. There are a lot of bad coding practices, and I’ll show you how easy it is to bypass them and to protect yourself against it.

PHP: Inline Switch Statement (Anonymous Function)

Published on

Another reason why I love PHP is its ability to do so many things inline, while keeping the code flow amazingly simple. This is an inline anonymous switch statement, and it allows us to use a switch statement to return us something.

PHP: Adding CSRF protection is super easy!

Published on

Adding CSRF protection to a PHP script is really easy once you understand how and what it should be doing. This post gives you a very easy example on how you can protect your forms against CRSF, with a very simple class.