Category Archives: PHP

PHP Random Secure Password Generator Class

UPDATE: If you don’t want to spend the time implementing this code, and just want to generate some passwords, I’ve put it on a separate website: www.random-password.net.

I just recently had to create a function to generate random passwords on a site I was developing and thought it would be an ideal thing to expand upon and put into a class. If you’re not familiar with using classes, I also have integration code below.

This source code is provided free of charge under the condition that my name remains upon it. Any modifications, improvements and suggestions will be gratefully received.

Read more »

PHP Mail Script Security – Stop SPAM Vulnerabilities

Have you written any PHP scripts to handle email sending? The mail() function is one of the simplest and most useful of PHP’s in-built functions, but poorly written code can expose a huge vulnerability that allows your simple mail script to be hijacked by spammers. Read more »