The list below is a compilation of list of some useful code snippets which might help you when writing your awesome PHP scripts.
Also: See more PHP Scripts
1. Email address check
The aim of this project is to create an email address validation class (or function) that checks for technical validity1 in email addresses, the idea being then that a site can send an email to that address to verify ownership.
2. Random password generator
Is a complete, working random password generation function for PHP. It allows the developer to customize the password: set its length and strength. Just include this function anywhere in your code and then use it.
3. Get IP address
Returns the real IP address of a visitor, even when connecting via a proxy.
6. String encoding to prevent harmful code