Tweaked LAMP script