title: how to create a php script with parameters
body: <p>I have a small issue, I want to create a simple php script callable from external program or whatever.
  I tried : </p>
  
  <pre><code>&lt;?php
  var_dump($argv);
  ?&gt;
  </code></pre>
  
  <p>then call it <code>http://localhost/test/script.php?a=test</code> 
  and I got :</p>
  
  <pre><code>undefined argv
  </code></pre>
  
  <p>in shell everything is fine : </p>
  
  <pre><code>php -q script.php foo bar
  array(3) {
    [0]=&gt;
    string(10) "script.php"
    [1]=&gt;
    string(3) "foo"
    [2]=&gt;
    string(3) "bar"
  }
  </code></pre>
  
  <p>When I use <code>$argv = $_GET;</code> I get HTTP working : <code>http://localhost/test/script.php?test="abc"</code> gives <code>array(1) { ["test"]=&gt; string(5) ""abc"" }</code> but shell gives array(0) !!!!!</p>
  
  <p>How can I do to be able to call it from command line and from web browser. ?
  many thanks</p>