Generating Website Screenshots with PHP

In this post, I’m going to introduce a PHP package I recently released for generating screenshots of web pages. It’s pretty straightforward to get up-and-running, as I’ll demonstrate.

Why Generate Screenshots?

There are a number of reasons you may wish to generate screenshots. My motivation behind the package originally was to build a simple “directory” of websites, using screenshots to illustrate the sites.

Read More

Building Applications with Backbone and Laravel: JST

You might well be used to developing Backbone views like this:

MyApp.Views.SomeView = Backbone.View.extend({    
  template: _.template('<ul><% _.each(items, function(item){ %><li><%= item %></li><% }); %></ul>'),    
  el: '#some-element',

This is all fine and well for simple structures, but can quickly get unwieldly if you’re building markup of any significant size or complexity.

Read More

Legal Pages in Laravel

Most sites have pages for Terms and Conditions, a Privacy policy and / or a page about cookies. Presumably they are usually tucked away in a CMS somewhere, or as static HTML — no doubt copied & pasted verbatim from the Internet.

Read More

Working with UK Postcodes in PHP

I’ve created a simple package for working with UK Postcodes. It contains two principle components:

  1. A simple class to encapsulate UK Postcodes
  2. A wrapper to this web service

The postcode class can be used for:

  • validating postcodes
  • formatting them, e.g. “sw1a2aa” -> “SW1A 2AA
  • getting the outcode (the first part of a postcode; e.g. M1, SW1A, GL9)

The meat and bones of the package, though, is the web service.

Read More

Running Laravel Artisan Commands from your Admin Dashboard / GUI

Sometimes you may wish to run Artisan commands from your admin dashboard / application, without using the command line. Perhaps you don’t have access to the command line (in which case perhaps it’s time to switch hosting!), or more likely perhaps you want to manually run tasks right from your application.

Read More


Subscribe to Blog