diff --git a/cexapi.class.php b/cexapi.class.php index 5a77433..6cff076 100644 --- a/cexapi.class.php +++ b/cexapi.class.php @@ -58,14 +58,7 @@ private function nonce() { * @return array JSON results */ private function post($url, $param = array()) { - $post = ''; - if (!empty($param)) { - foreach($param as $k => $v) { - $post .= $k . '=' . $v . '&'; //Dirty, but work - } - - $post = substr($post, 0, strlen($post)-1); - } + $post = http_build_query($param); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);