I AM A PHP GOD!


I've seen various spoofs of the terror alert level system that pull from the DHS website to stay updated.

Naturally, I wanted my own. But I couldn't find one that was easy to install/implement, or easy for me to understand, for that matter. So after much PHP writing, re-writing, wailing, gnashing of teeth, etc., I finally cobbled together a PHP script that works for me.

Here it is in action, with my own graphics from Dragon Tales*.

OK, so it's neither terribly efficient nor fast, but it's simply constructed and it works! The customization should be fairly easy for anyone with a basic knowledge of HTML. If you want to distribute it, please link to me to show where you got it from. Otherwise, it's open.

Thanks to Phill Kenoyer for posting his original PHP script that I swiped the XML parser out of. Thanks to Oscar Hills for the idea to use preg_match to determine what the status is instead of stabbing in the dark with '=='. Thanks to my bud Dan Pourhadi for use of a hundred KB or so on his web server to run this. Thanks to TheCodingMonkeys for SubEthaEdit, with it's rocking syntax highlighting for PHP (and 15 other languages, too).

*(I was also thinking of doing one with Pokemon...how does "alert level Pikachu" sound?)

I've seen various spoofs of the terror alert level system that pull from the DHS website to stay updated.

Naturally, I wanted my own. But I couldn't find one that was easy to install/implement, or easy for me to understand, for that matter. So after much PHP writing, re-writing, wailing, gnashing of teeth, etc., I finally cobbled together a PHP script that works for me.

Here it is in action, with my own graphics from Dragon Tales*.

So, now, in the interest of giving something back, I release that script to the world:

terror.php.zip

OK, so it's neither terribly efficient nor fast, but it's simply constructed and it works! The customization should be fairly easy for anyone with a basic knowledge of HTML.
If you want to distribute it, please link to me to show where you got it from. Otherwise, it's open.

Credits:
Thanks to Phill Kenoyer for posting his original PHP script that I swiped the XML parser out of.
Thanks to Oscar Hills for the idea to use preg_match to determine what the status is instead of stabbing in the dark with '=='.
Thanks to my bud Dan Pourhadi for use of a hundred KB or so on his web server to run this.
Thanks to TheCodingMonkeys for SubEthaEdit, with it's rocking syntax highlighting for PHP (and 15 other languages, too).

*(I was also thinking of doing one with Pokemon...how does "alert level Pikachu" sound?)

Posted: Fri - March 26, 2004 at 01:19 AM          


©