title: Failed loading cafile stream in "file_get_contents()"?
body: <p>I was trying to get json data from google geocoding api. However the php warning shows some error about "failed loading cafile stream"</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$apiKey  = 'apikey';
  $address = urlencode( '1600 Amphitheatre Pkwy, Mountain View, CA 94043' 
  );
  $url     = "https://maps.googleapis.com/maps/api/geocode/json?address= 
      {$address}key={apiKey}";
  $resp    = json_decode( file_get_contents( $url ), true );
  echo $url;
  
  $lat    = $resp['results'][0]['geometry']['location']['lat'] ?? '';
  $long   = $resp['results'][0]['geometry']['location']['lng'] ?? '';
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>PHP Warning:  failed loading cafile stream: `C:\xampp\apache\bin\curl-ca- 
  bundle.crt' in C:\Users\1\Desktop\test.php on line 7
  
  Warning: failed loading cafile stream: `C:\xampp\apache\bin\curl-ca- 
  bundle.crt' in C:\Users\1\Desktop\test.php on line 7
  PHP Warning:  file_get_contents(): Failed to enable crypto in 
  C:\Users\1\Desktop\test.php on line 7
  
  Warning: file_get_contents(): Failed to enable crypto in 
  C:\Users\1\Desktop\test.php on line 7
  PHP Warning:  
  file_get_contents(https://maps.googleapis.com/maps/api/geocode/json? 
  address=1600+Amphitheatre+Pkwy%2C+Mountain+Vi
  ew%2C+CA+94043key={apiKey}): failed to open stream: operation failed in 
  C:\Users\1\Desktop\test.php on line 7
  
  Warning: 
  file_get_contents(https://maps.googleapis.com/maps/api/geocode/json? 
  address=1600+Amphitheatre+Pkwy%2C+Mountain+View%2C
  +CA+94043key={apiKey}): failed to open stream: operation failed in 
  C:\Users\1\Desktop\test.php on line 7
  https://maps.googleapis.com/maps/api/geocode/json? 
  address=1600+Amphitheatre+Pkwy%2C+Mountain+View%2C+CA+94043key={apiKey}
  </code></pre>