title: GET request with data-urlencode in PHP
body: <p>I am trying to make an API call to Influx db from PHP program. The curl request to be made is -</p>
  
  <pre><code>curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "q=SHOW MEASUREMENTS"
  </code></pre>
  
  <p>The code in PHP that I am stuck with is -</p>
  
  <pre><code>$curl = curl_init();
  curl_setopt_array($curl, array(
      CURLOPT_URL =&gt; "http://localhost:8086/query?pretty=true",
      CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST =&gt; "GET",
      CURLOPT_HTTPHEADER =&gt; array(
          "cache-control: no-cache"
      ),
  ));
  </code></pre>
  
  <p>I am not sure in which <strong>curl_setopt_array</strong> should I send the <strong>q=SHOW MEASUREMENTS</strong></p>