vers. 1.0.1.1 - adding the best samples from PHP Cookbook