| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'get.php')
| -rw-r--r-- | get.php | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,4 +1,17 @@ <?php + + /** Allows the use of get.php as an CLI tool **/ + /** Example: php -e get.php m=IATI,3DIS g=M1_INFO **/ + /** Patch by Mael Valais **/ + if (php_sapi_name() == "cli") + { + for ($c = 1; $c < $argc; $c++) + { + $param = explode("=", $argv[$c], 2); + $_GET[$param[0]] = $param[1]; // $_GET['name1'] = 'value1 + } + } + header('Content-Type: text/calendar; charset=UTF-8'); $group = $_GET["g"]; |


