diff --git a/php/AuthSCHClient.class.php b/php/AuthSCHClient.class.php index a27e428027663438566afeca9d2c3fdc52a1ba96..ff8818816ba64a3bc4e8abf7597820cec2ce7798 100644 --- a/php/AuthSCHClient.class.php +++ b/php/AuthSCHClient.class.php @@ -121,7 +121,11 @@ class AuthSCHClient { } public function getData() { - $response = @file_get_contents(self::$host . 'api/profile/?access_token=' . $this->tokens->access_token); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, self::$host . 'api/profile/?access_token=' . $this->tokens->access_token); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $response = curl_exec($ch); + curl_close($ch); if(isset($response) && $response !== false && !empty($response)) { $data = json_decode($response); if($data !== null) {