Compare commits

..

2 commits

Author SHA1 Message Date
Kevin Wenger
1eab9c4f5c Improve coding conventions 2015-06-12 10:45:55 +02:00
Kevin Wenger
660b2ddcc2 Remove SSL Verify on Windows
Avoid error CURL Error: SSL certificate problem: unable to get local issuer certificate on windows whitout ssl
2015-06-11 17:38:57 +02:00
2 changed files with 8 additions and 2 deletions

View file

@ -1 +0,0 @@
github: joshtronic

View file

@ -8,10 +8,17 @@ class GooglePlacesClient
{
$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,
);