Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions curl.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function getCookies(){
}

function setDataMode($val){
curl_setopt($this->curl, CURLOPT_BINARYTRANSFER, $val);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, $val);
}

function close() {
Expand Down Expand Up @@ -172,8 +172,12 @@ function getHttpCode() {
function makeQuery($data) {
if (is_array($data)) {
$fields = array();
foreach ($data as $key => $value) {
$fields[] = $key . '=' . urlencode($value);
foreach ($data as $key => $value) {
if(is_array($value))
$fields[] = $key."[]=".implode("&".$key."[]=",$value);
else
$fields[] = $key . '=' . urlencode($value);

}
$fields = implode('&', $fields);
} else {
Expand Down