I tried things like $_ENV[\'CLIENTNAME\'] == \'Console\' but that seems to work on only certain OS\'s (worked in windows, not linux).
I tried !empty($_ENV[\'SHELL\']) b
I know this is an old question, but for the record, I see HTTP requests coming in without a User-Agent header and PHP does not automatically define HTTP_USER_AGENT in this case.