Send multiple values for same name form item via curl

Hello,

I am using a FAX API in an script of my office. I am actually, automating the faxing process.

Now, the documentation of the API says, that the HTTP POST header should be like this :


Content-Disposition: form-data; name="Recipient"

5556465589|John Doe
-----------------------------7d54b1fee05aa
Content-Disposition: form-data; name="Recipient"

5555568552|John Smith
-----------------------------7d54b1fee05aa

You can see that the name is same, but it cant be an array. Because, when I tried that, it shows “ARRAY” to the system where it submits. Now, that system is beyond my control .

Here you can see the API Documentation.

https://service.ringcentral.com/faxoutapi/

Please guide

ZH

Well, you can post the same key multiple times, sure. Most systems will overwrite them, though. apparantly theirs doesnt?


curl_setopt($ch,CURLOPT_POSTFIELDS,'Recipient=someperson&Recipient=someotherperson');

Thanks, I did that, but it took the last occurrence - unfortunately.