diff --git a/src/GooglePlacesClient.php b/src/GooglePlacesClient.php index 9a7ca30..e897abe 100644 --- a/src/GooglePlacesClient.php +++ b/src/GooglePlacesClient.php @@ -8,10 +8,17 @@ public function get($url) { $curl = curl_init(); + $ssl_verifypeer = true; + // Remove ssl certificate verification for Windows + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + $ssl_verifypeer = false; + } + $options = array( CURLOPT_URL => $url, CURLOPT_HEADER => false, - CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYPEER => $ssl_verifypeer, CURLOPT_RETURNTRANSFER => true, );