September 1, 2023
by Matt Raines

Looking back to 2008

« 2006 | 2007 | 2008 | 2009 | 2010 »

2008 was an incredible time to be at Prater Raines, a year of events that honestly we are still struggling to live up to 15 years on.

The pinnacle of which was obviously working alongside Joanna Lumley on the Gurkha Justice Campaign where we built a bespoke online petition which ultimately received nearly a quarter of a million signatures and changed the law. In the meantime we plotted in Joanna’s summer house and we wowed the crowds of schoolchildren visiting the Houses of Parliament. I think it genuinely took some of the Lords down a bit to realise they weren’t the most famous people in the room. And I will always have with me the memory of watching the web server logs with trepidation throughout Joanna’s appearance on Al Murray’s Happy Hour on ITV one Friday night in October.

Peter Carroll has detailed it all in his book, in which I think I appear as a footnote to something like chapter 11 as “Tim Prater’s colleague was also in the room”. But it really was an excellent and surreal part of my life.

Prater Raines with Nick Clegg at Lib Dem conferenceMy involvement with PHP London continued to pay dividends as I was invited to the Dutch PHP Conference, PHP North West & PHP Barcelona and went on a fact-finding mission to the National Museum of Computing. Tim barely even rolled his eyes when I told him how important it was to attend networking events or when I had to fly via Switzerland because reasons. Microsoft were keen to sponsor PHP community events at the time which meant freebies to Wembley to see the NFL showcase game with Scott MacVicar, who went on to great things at Facebook and Stripe (we mostly played on the XBoxes in the corporate box). In return I did agree to take Tim with me to Open Tech at the University of London Union where we were practically barred from leaving until we agreed to join the Open Rights Group.

Prater Raines corporate website in 2008We were registering more and more .uk domains so this was the moment we decided to join Nominet as a registrar. For the next few years Nominet’s membership engagement programme, surprisingly unpopular amongst organisations other than Prater Raines, would take us into the bowels of Tower Bridge for a poker and close magic night and to the Hilton Metropole to watch Gabrielle Aplin and Spelbound perform at ICANN 50.

Development of the Lib Dem platform continued and this year we began offering a cut-down free service to any local party in the country that didn’t already have a website. News was automatically updated from nearby sites and it ensured an online presence for the party everywhere in the country.

Having moved our servers from Docklands to Maidenhead with pretty much no notice the previous year, this was the year our hosting partner decided we needed to pay 4 times as much as well. Research began into renting a quarter rack of space somewhere else instead of room for 2 servers here, but it would be next year that it really paid off.

Meanwhile early in December an email arrived from Tim to announce he was moving house to live above an abandoned newsagent on Sandgate High Street. And there another story begins…

Tools of the trade

Location, location, location

The year in tech

Sample code

<?php

if (!defined('__DIR__')) {
    define('__DIR__', dirname(__FILE__));
}
if (php_sapi_name() != 'cli'
    && (!isset($_SERVER['PHP_AUTH_USER'])
        || !isset($_SERVER['PHP_AUTH_PW'])
        || $_SERVER['PHP_AUTH_USER'] != $_ENV['AUTH_USER']
        || $_SERVER['PHP_AUTH_PW'] != $_ENV['AUTH_PW'])) {
    header('WWW-Authenticate: Basic realm="Gurkha Justice"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Not authorized';
    exit;
}
header('Content-Type: text/plain');

try {
    $db = new PDO('mysql:host=' . $_ENV['DB_HOST'] . ';dbname=' . $_ENV['DB_NAME'],
                  $_ENV['DB_USER'], $_ENV['DB_PW']);
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $result = $db->query('SELECT COUNT(*) FROM signature');
    $count = $result->fetch(PDO::FETCH_COLUMN);
} catch (PDOException $e) {}

$html = file_get_contents(__DIR__ . '/index.html');
$html = preg_replace(
    '[<span id="numberofsignatures">\d+</span>]',
    "<span id=\"numberofsignatures\">$count</span>",
    $html);
$html = preg_replace(
    '[<span id="lastupdate">[^<]+</span>]',
    '<span id="lastupdate">' . date("H:i T \o\\n l j F Y") . '</span>',
    $html);
file_put_contents(__DIR__ . '/index.html', $html, LOCK_EX);

echo "$count\n";

?>