David Hurst

PHP/MySQL, REALbasic, Javascript Developer

PHP mail() and ssmtp on Debian Linux

If, like me, you have a dedicated mail server that you want your PHP scripts to use, you may have come across ssmtp. ssmtp is a cut-down MTA that simply sends mail off to another server - ideal for scenarios where you don’t need to receive mail on your web server, but you do want […]

Read the rest of PHP mail() and ssmtp on Debian Linux

PHP - include all files in a folder

Ever wondered how to include every file, or a series of files in a folder without having to reference them individually? It’s easily done with PHP’s glob() function.

Read the rest of PHP - include all files in a folder

Using Recursive Functions in PHP to Manage Hierarchy

The recursive function is an essential tool for anybody developing PHP sites that feature multiple levels of categories, pages etc. In fact, they are great for managing hierarchical relationships (sometimes referred to as parent/child relationships). There are many applications of this, but the example I’m going to show you is categories, such as you might […]

Read the rest of Using Recursive Functions in PHP to Manage Hierarchy

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 […]

Read the rest of PHP Random Secure Password Generator Class