Hey. I’ve just started writing my simplest classes for a new content management micro-system in php, and I’d like to share some moments with you. These classes will probably be good for php noobs out there struggling in the world of object-oriented programming – go for the basics. The Logger class is just a text logger with simple functionality good for logics debugging. The...
Simple Watermarking with PHP
Here’s a pretty code snippet for watermarking images with php. <?php header('Content-type: image/jpeg'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg('photo.jpg'); $size = getimagesize('photo.jpg'); $dest_x...