Fixed the way that curl sends post data with multipart content-type

This commit is contained in:
xdrm-brackets 2017-01-28 13:00:49 +01:00
parent dbfd0662ea
commit 94685a0210
1 changed files with 5 additions and 5 deletions

View File

@ -75,16 +75,16 @@
$postarray['renew'] = $new;
/* (3) Parse postfiels to multipart format */
$postraw = "--$boundary";
#$postraw = "--$boundary";
foreach($postarray as $postkey=>$postvalue)
$postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary";
#foreach($postarray as $postkey=>$postvalue)
# $postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary";
$postraw .= "--";
#$postraw .= "--";
/* (4) Set postdata raw to curl */
curl_setopt($curl, CURLOPT_POSTFIELDS, $postraw);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postarray);