Detect apache mod with PHP
public php v1 · immutable/** * return true if the module $name is activated in apache * * @param string $name module name * @return boolean * @author Samdha <contact@samdha.net> **/function detect_apache_mod($name) { $save = ob_get_clean(); ob_start(); phpinfo(); $phpinfo = ob_get_clean(); if ($save !== false) { ob_start(); echo $save; } return (strpos($phpinfo, $name) !== false);}if (detect_apache_mod('mod_evasive')) sleep(1);