It is quite common to run into situations where PHP errors are suppressed or written to a log file somewhere on a live, non-development server. If you are troubleshooting and need to see the error that can be a pain. Luckily PHP and Apache have provided us with two great workarounds. The first happens through
PHP: Add Google Analytics to an entire static HTML website with PHP
I am in a situation where I need analytics data and none is provided. The entire 35k+ file website is all static HTML running on a Windows IIS server. I am not familiar enough with Windows Server to know what sort of scripting capabilities there are, but I do have PHP available. I wrote a
Javascript: Forward user to new page
I often find myself needing to forward a user through Javascript for various reasons. Here are a couple quick snippets of Javascript to accomplish that task. This one is supposed to block the Back button from tracking the change window.location.replace(“http://example.com”); window.location = “http://www.example.com”;
jQuery: Detect enter key
Sometimes it is nice to be able to detect when the user has pressed the enter. This is great for super custom forms and Javascript games. Or maybe a totally custom built app that is waiting for the user to hit enter for some reason. But how to detect the enter key? Luckily jQuery once
New Website Launch: Leon Powers
Leon Powers commissioned me to build a website for his publishing entity Look-About-Books and his Boy Scout pseudonym Doc Hawk. It came together pretty well. Take a look and order his new book while you are there. Visit Leon Powers Website