title: curl doesn't work on PHP
body: <p>I'm making an application, using Google URL Shortener API.</p>
  
  <p>On MackBook Pro, the following code does work, but on Windows PC, it doesn't work and shows only "NULL" on the screen.</p>
  
  <pre><code>&lt;?php 
  
  // APIkey
  $apiKey = '[Here is my API KEY]';
  
  $longUrl = "http://www.absolute-keitarou.net/blog/";
  
  $url1 = 'https://www.googleapis.com/urlshortener/v1/url?key='.$apiKey;
  $params = json_encode(array(
  "longUrl" =&gt; $longUrl
  ));
  
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, $url1);
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  $res = json_decode(curl_exec($curl));
  curl_close($curl);
  
  var_dump($res);
  ?&gt;
  </code></pre>
  
  <p>On the MacBook, the code does work properly and shows the following.</p>
  
  <p>object(stdClass)#1 (3) { ["kind"]=> string(16) "urlshortener#url" ["id"]=> string(19) "<a href="http://goo.gl/TMII0" rel="nofollow">http://goo.gl/TMII0</a>" ["longUrl"]=> string(38) "<a href="http://www.absolute-keitarou.net/blog/" rel="nofollow">http://www.absolute-keitarou.net/blog/</a>" }</p>
  
  <p>I want the Windows PC to shows the same output as the MacBook. Please tell me what I should do.</p>