Tag Archive

PHP Timezone Hack – Overriding server timezone

Published on September 1, 2008 By George

UPDATE Nov 2010: Much shorter code over on my Tech Blog… PHP Local Time in your timezone As is often the case I work on servers that are not in the same timezone as I am, or servers whose time is set to Greenwich Mean Time (GMT). This PHP time hack below is something I [...]

PHP Redirect – flexible and even scripted redirection

Published on August 30, 2008 By George

Generally speaking I prefer 301/302 redirects in .htaccess because I find on a domain-wide basis they are easier to manage since all redirects are in one handy file. Sometimes, though, redirection with PHP is a better fit, and since I’ve not remembered to add this little bit to my Dreamweaver Snippets, I thought maybe someone [...]