Question: Say we usually it access via

```
http://localhost/index.php?a=1&b=2&c=3

```

How do we execute the same on a Linux command prompt?

```
php -e index.php

```

But what about passing the $\_GET variables? Maybe something like `php -e index.php --a 1 --b 2 --c 3`? I doubt that'll work.

Answer: 
Use:

```
php file_name.php var1 var2 varN

```

Then set your `$_GET` variables on your first line in PHP, although this is not the desired way of setting a `$_GET` variable and you may experience problems depending on what you do later with that variable.

```
if (isset($argv[1])) {
   $_GET['variable_name'] = $argv[1];
}

```

The variables you launch the script with will be accessible from the `$argv` array in your PHP application. The first entry will the name of the script they came from, so you may want to do an `array_shift($argv)` to drop that first entry if you want to process a bunch of variables. Or just load into a local variable.
I just pass them like this:

```
php5 script.php param1=blabla param2=yadayada

```

It works just fine. The $\_GET array is:

```
array(3) {
  ["script_php"]=>
  string(0) ""
  ["param1"]=>
  string(6) "blabla"
  ["param2"]=>
  string(8) "yadayada"
}

```