fix reconnectLte
[GitHub/Stricted/speedport-hybrid-php-api.git] / SpeedportHybrid.class.php
index ba390e6c586f2a81c5eeccfb270383c548c68fdc..c135643cd5163d77b29c03fef5f52a4a9e0d8315 100644 (file)
@@ -115,17 +115,17 @@ 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);
                        }
                }