It is for windows only.
The main aim is to identify who does php-script run – browser or cron. Therefore I would like to get print of $_SERVER in console application and understand what is the difference.
May be someone knows how to identify request from cron.
Thanks to all in advance!
I believe you can test
$_SERVER['HTTP_HOST']. If it is not set it’s via the CLI, otherwise it’s a browser. That is: