Skip to content

Commit

Permalink
Merge pull request #5 from Tony0892/patch-1
Browse files Browse the repository at this point in the history
Update ga_api.php
  • Loading branch information
chonthu committed Aug 26, 2013
2 parents abb1fb7 + 0a5070e commit a79c09d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions libraries/ga_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -718,11 +718,15 @@ protected function curl_init($url) {
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: GoogleLogin auth=$this->auth"));
}

// the following thanks to Kyle from www.e-strategy.net
// i didn't need these settings myself on a Linux box but he seemed to need them on a Windows one
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// Check for safe mode, CURLOPT_FOLLOWLOCATION will throw an error if safe mode is active
if( ini_get('safe_mode') != FALSE ) {

// the following thanks to Kyle from www.e-strategy.net
// i didn't need these settings myself on a Linux box but he seemed to need them on a Windows one
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
}

return $ch;
}
Expand Down

0 comments on commit a79c09d

Please sign in to comment.