Archive for September, 2008

isApache() and isIIS() functions for PHP

A couple quick little functions for when you need to know if you're running on Apache or IIS.
PLAIN TEXT
PHP:

function isApache()

    {

    return ((bool) preg_match('/Apache/i', $_SERVER['SERVER_SOFTWARE']));

    }

function isIIS()

    {

    return ((bool) preg_match('/IIS/i', $_SERVER['SERVER_SOFTWARE']));

    }

isApache() will return true if it's running on an Apache server and false if not. [...]

Java code practice on JavaBat

Looking for a place to polish up your Java skills?  Try JavaBat.  It's a library of short Java projects that you fill in the code and it'll check if for you.