The Blog of Hull based

Web Developer David Carr.

I blog about Web Development and Web Design.

How to use Github Hooks to send updates to your website

For anyone that uses Github know’s how useful it is, especially on the collaboration front. Allowing other people to work on your projects, for instance for Nova Framework I have a Docs repo. When I update the docs it would be really good if the website docs could be updated automatically. In this tutorial I will cover how to setup a hook and do something with it on a remote website using PHP.

Read more

PHP reverse date using strtotime

I use datepickers a lot in my projects the date’s default to the American YYYY-MM-DD format so they store in the database, the trouble is my clients are UK based so it’s not very readable. The datepickers let you set the format you want so I use DD-MM-YYYY.

That’s great until it needs to go into a MySQL database then I need the former date. As I know what the format will always be using strtotime makes it easy to convert like this:

Read more

PHP 5.5 is now end of live, upgrade to 5.6 or higher.

As of the 10th July 2016 php 5.5 is officially end of life, as a result it should not be used anymore. Any applications still using 5.5 should be upgraded to php 7 ideally or failing that 5.6 as a minimum. 

5.5 was released in 2013, active support ended 10th July 2015, today security support has ended. Any vulnerabilities that may exist in 5.5 will NOT be patches any more and could leave your site vulnerable to attack.

If you host does not have 5.6 or higher I highly recommend you contact them and ask to be upgraded or find a better host.

Upgrading to 5.6 should be painless nearly everything works without changes, having said there there are some backward incompatible see migrating from 5.5 to 5.6

Read more

Hide form elements easily with conditionize.js

When working with forms it’s common to hide or show form elements based on a condition, this involved writing javascript to check for a change on the chosen element once detected then activate a show or hide code snippet. Whilst that works well it can be time consuming and tedious when doing multiple conditions. This is where a conditionize.js comes in.

Read more

Mac: Wrap any website to a desktop app using Fluid

I’ve been thinking recently that it would be really nice be able to have a website wrapped as a desktop appliation much like how the Whatsapp wrapper work. Fluid a Mac tool does this!

download it from

Enter a website address give it a name and select an icon or select to use the websites icon. Then the website application will be created as a desktop app, this internally uses Chrome.

Read more

Autoscroll page with jQuery

There are times when it’s really useful for a webpage to scroll up and down automatically. For instance when showing information on a TV screen you may not want to scroll manually. Using jQuery its possible to have the page automatically scroll down at a set speed then scroll back to the top and repeat.

Read more