On 5/14/06, Ryan A <[EMAIL PROTECTED]> wrote:
Anyone have an idea of a variable (eg: $_SERVER['REQUEST_METHOD'] ) that will be set only if called via the web and ignored if called via cli?
I have no experience with CLI, and haven't tested this, but I believe that any time a request comes through a web browser, the $_GET and $_POST values are set, even if they're empty. This may go for the $_COOKIE global as well. So you could simply check if one of these are set: isset($_POST) But again I have no CLI experience, so I could be off. But it's worth testing... HTH, John W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php