title: Simple PHP Google Places API request
body: <p>So if I put this in my browser URL:</p>
  
  <pre><code>https://maps.googleapis.com/maps/api/place/search/xml?location=45.508867,-73.554242&amp;radius=500&amp;sensor=false&amp;key=mykey
  </code></pre>
  
  <p>It works. But if I try the exact same call in PHP I get ACCESS DENIED:</p>
  
  <pre><code>&lt;?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://maps.googleapis.com/maps/api/place/search/xml");
    curl_setopt($ch, CURLOPT_POSTFIELDS, "location=45.508867,-73.554242&amp;radius=500&amp;sensor=false&amp;key=mykey");
    $result = curl_exec($ch);
    echo $result;
  ?&gt; 
  </code></pre>
  
  <p>I tried many different options and minor changes but nothing works and I can't figure out why.</p>