I haven't worked in PHP for a long time, and I know a couple of you guys do.
I need to set a http response status code in php. I've read that it depends on how php is executing.
<?php
header("HTTP/1.1 403 Forbidden"); // for mod_php
header("Status: 403 Forbidden"); // for fastcgi
?>
is this true? if so, how do i determine the type of php environment, i.e. cgi/fastcgi or mod_php? it's required that i do this in PHP and not via an apache setting, is there a better way?