On 10/11/07, Anders Norrbring <[EMAIL PROTECTED]> wrote: > > Is there a good way to detect in a script if it's called locally from > command line, or via a remote browser? > > Anders
maybe not the best, but works for linux: <?php if(isset($_SERVER['SHELL'])) { echo 'cli script' . PHP_EOL; } else { echo 'web script'; } ?> -nathan