X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=blobdiff_plain;f=SpeedportHybrid.class.php;fp=SpeedportHybrid.class.php;h=06030a604a17300de2ad28ae981503ee59dff703;hp=ba390e6c586f2a81c5eeccfb270383c548c68fdc;hb=8d0ef90a01ef074a0ab00e58d534195763cb09ec;hpb=d5fcf33db575918d2f4f1ba2d69008885c2a39a4 diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index ba390e6..06030a6 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -115,17 +115,16 @@ class SpeedportHybrid { * @return array */ private function sendRequest ($path, $fields, $cookie = false, $count = 0) { - $url = $this->url.$path.'?lang=en'; + $url = $this->url.$path; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); if (!empty($fields)) { + curl_setopt($ch, CURLOPT_POST, true); if (is_array($fields)) { - curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields)); } else { - curl_setopt($ch, CURLOPT_POST, $count); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); } }