| « Free and Custom Twitter Backgrounds | Example of Using Serialize() on PHP Arrays » |
Inspekt is a “comprehensive input filtering and validation library for PHP4 and PHP5″. What that means is it protects your scripts from people inputting “dangerous data”, whether accidentally or maliciously.
Inspekt acts as a sort of ‘firewall’ API between user input and the rest of the application. It takes PHP superglobal arrays, encapsulates their data in an “cage” object, and destroys the original superglobal. Data can then be retrieved from the input data object using a variety of accessor methods that apply filtering, or the data can be checked against validation methods. Raw data can only be accessed via a ‘getRaw()’ method, forcing the developer to show clear intent.
It looks easy to use and is all contained in a single PHP file. I’ll be giving this a try soon. Via inspekt on Google Code.
2 Responses to “Inspekt – PHP Input Filtering and Validation Library”
Leave a Reply
Additional comments powered by BackType






June 1st, 2009 at 5:34 pm
Inspekt – a PHP Input Filtering and Validation Library http://bit.ly/lAaB4 via @nick_ramsay
This comment was originally posted on Twitter
June 3rd, 2009 at 5:03 am
Hi, good post. I have been wondering about this issue,so thanks for posting.