From: Stricted Date: Sat, 18 Jul 2015 17:51:49 +0000 (+0200) Subject: force language = english X-Git-Tag: 1.0.3~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49abc701eb69d85d6b551af9b383bc624f3d51e8;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git force language = english --- diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index 32b6bdb..cd68051 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -416,7 +416,7 @@ class SpeedportHybrid { * @return array */ private function sentRequest ($path, $fields, $cookie = false, $count = 0) { - $url = $this->url.$path; + $url = $this->url.$path.'?lang=en'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); @@ -450,7 +450,6 @@ class SpeedportHybrid { curl_close($ch); // fix invalid json - $body = preg_replace("/(\r\n)|(\r)/", "\n", $body); $body = preg_replace('/\'/i', '"', $body); $body = preg_replace("/\[\s+\]/i", '[ {} ]', $body); @@ -467,7 +466,7 @@ class SpeedportHybrid { private function getToken () { if ($this->checkLogin() !== true) throw new Exception('you musst be logged in to use this method'); - $path = 'html/content/overview/index.html?lang=de'; + $path = 'html/content/overview/index.html'; $fields = array(); $data = $this->sentRequest($path, $fields, true);