I\'m trying to write down a script to fetch some online data; script should be invoked either by a cron job or php cli and with standard GET HTTP re
You will have to use $_GET or $_SERVER['argv'] depending on how your script is called. Neither one is used for both.
$_GET
$_SERVER['argv']
For example:
if(!empty($_SERVER['argv'][0]) { $a = $_SERVER['argv'][1]; $b = $_SERVER['argv'][2]; } else { $a = $_GET['a']; $b = $_GET['b']; }