Useful datetime functions with PHP and MySQL

Posted on 28/02/2016 23:55:05

Here are a few useful date & time functions and especially useful when pulling a datetime field from a mySQL database using PHP. <?php …
Click to read more

Get image size values with PHP

Posted on 18/02/2016 18:54:34

This is especially useful if you need to grab either width and height values from an image that you need to display when implementing rich snippets and you need singular values …
Click to read more

Bootstrap Breadcrumbs with PHP

Posted on 12/02/2016 20:37:48

I found this excellent but not perfect function on stackoverflow and modified it as it allowed the last crumb to be a hyperlink and clickable, which is not right for t…
Click to read more

Protect a script with a required parameter in PHP

Posted on 01/02/2016 20:40:07

Have you ever needed to protect a specific file with a required GET parameter, such as a script that runs via a scheduled task/cron job that checks for any database changes, upd…
Click to read more

PHP Image resizing function (PHP/GD2)

Posted on 01/02/2016 19:27:59

I found this code somewhere online and I am currently using it on this website, but quickly found a problem with transparency when genera…
Click to read more

JPG or PNG for website images?

Posted on 28/01/2016 17:31:19

As a rule of thumb I use JPG for photos and PNG-8 or PNG-24 for logos etc. Photoshop has an "export for web" function, where you can modify the settings to minimise the file …
Click to read more