Fixed the way that curl sends post data with multipart content-type
This commit is contained in:
parent
dbfd0662ea
commit
94685a0210
|
@ -75,16 +75,16 @@
|
||||||
$postarray['renew'] = $new;
|
$postarray['renew'] = $new;
|
||||||
|
|
||||||
/* (3) Parse postfiels to multipart format */
|
/* (3) Parse postfiels to multipart format */
|
||||||
$postraw = "--$boundary";
|
#$postraw = "--$boundary";
|
||||||
|
|
||||||
foreach($postarray as $postkey=>$postvalue)
|
#foreach($postarray as $postkey=>$postvalue)
|
||||||
$postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary";
|
# $postraw .= "\r\nContent-Disposition: form-data; name=\"$postkey\"\r\n\r\n$postvalue\r\n--$boundary";
|
||||||
|
|
||||||
$postraw .= "--";
|
#$postraw .= "--";
|
||||||
|
|
||||||
|
|
||||||
/* (4) Set postdata raw to curl */
|
/* (4) Set postdata raw to curl */
|
||||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $postraw);
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $postarray);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue