From d695a09285493ca648f46690b683ff6e0de524a8 Mon Sep 17 00:00:00 2001
From: zolij <zolij@sch.bme.hu>
Date: Thu, 11 Jun 2015 12:20:09 +0200
Subject: [PATCH] fixes #1

---
 php/AuthSCHClient.class.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/php/AuthSCHClient.class.php b/php/AuthSCHClient.class.php
index a27e428..ff88188 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) {
-- 
GitLab