• Home
  • Archives
  • Super Lamb Bananas
Subscribe: Posts | Comments | E-mail
  • Coding
  • Events
  • Gaming
  • Media
  • Myself
  • Photos
  • Places
  • School
  • Technology

Jordan Hatch’s Blog

Posts Tagged ‘php’


Posted on September 23, 2007 - by Jordan H

PHP Session Purging

I’ve been trying to make a login script that purges the sessions database so that users will only stay inactive for 1 hour until they have to log in again. All seems to be well, but then it just doesn’t work.

This is the code which I have on every page:

$time = date("ymdHis");
$cutoff = $time-1000;

$sql = "DELETE FROM adminsessions WHERE time<'$cutoff'";
mysql_query($sql) or die(mysql_error());

It should log the user out after 10 mins of inactivity. Doesn’t seem to be doing that at the moment. Anyone got any ideas?


Posted on September 20, 2007 - by Jordan H

CMSing is bloody hard…

I’ve been working on a custom CMS for a new game development studio. I decided to use PHP’s Smarty Template Engine as it’d make the template system really easy to use. Nope, not at all. Spent 5 hours fixing problems that seemed to all come from the default config settings and leak into the functions and classes. It’s supposed to be an easy setup, not a guru’s job.

The CMS is modular, it uses modules so we can extend it really easily. We’re also trying to integrate a vBulletin forum and their Single User Login system for their games. What did I say, CMSs are easy? Hell no.



  • Flickr Photos

  • Latest Tweets

    • Blogroll

      • Alexander Ward
      • Charlie Hothersall
      • Damien Walsh
      • Josh Semans
      • Karan Bhangui
      • Mike Tomasello
    • Find Me Online!

      • Brightkite
      • Flickr
      • Twitter
    • Archives

      • October 2008
      • September 2008
      • August 2008
      • July 2008
      • June 2008
      • May 2008
      • April 2008
      • March 2008
      • February 2008
      • January 2008
      • December 2007
      • November 2007
      • October 2007
      • September 2007
    • Tag Cloud

      • acegx blackpool blog burnout content database dlc flickr games geekup inactive iphone jhsystems lg liverpool login manchester modules newcastle perl php ps3 reviews script sessions single site sitemail smarty summer superlambanana system t-mobile television template theme twitter user users website wordcamp wordpress xbox 360 xewsletter x factor
    Copyright © 2006-8 Jordan Hatch
    Powered by WordPress