title: How to write Curl api example into PHP curl
body: <p>I am using <a href="https://apptweak.io" rel="nofollow">https://apptweak.io</a> api,
  they didn't mention PHP example in their code example...</p>
  
  <p>please tell me, how to understand and write Curl API example into PHP curl</p>
  
  <p>Here is simple "appteak.com" curl  example</p>
  
  <pre><code>curl -G https://api.apptweak.com/ios/applications/284993459/informations.json \
  -d country=us \
  -d language=en \
  -d device=iphone \
  -H "X-Apptweak-Key: my_api_key"
  </code></pre>
  
  <p>Here is other example</p>
  
  <pre><code>$ curl -H "X-Apptweak-Key: my_api_key" \
  https://api.apptweak.com/android/applications/com.facebook.katana.json?country=be&amp;language=nl
  </code></pre>
  
  <p><strong>How to write these curl in PHP?</strong></p>
  
  <p>i did this in php, after google, but its not work for me.</p>
  
  <pre><code>// Get cURL resource
  $curl = curl_init();
  // Set some options - we are passing in a useragent too here
  curl_setopt_array($curl, array(
      CURLOPT_RETURNTRANSFER =&gt; 1,
      CURLOPT_URL =&gt; 'https://api.apptweak.com/android/applications/com.facebook.katana.json?country=be&amp;language=nl',
     // CURLOPT_USERAGENT =&gt; 'Codular Sample cURL Request',
      CURLOPT_POST =&gt; 1,
      CURLOPT_POSTFIELDS =&gt; array(
          'X-Apptweak-Key' =&gt; "my_api_key",
      )
  ));
  // Send the request &amp; save response to $resp
  $resp = curl_exec($curl);
  // Close request to clear up some resources
  curl_close($curl);
  
  
  var_dump($resp ); //return false
  </code></pre>