I use CURL to post data in PHP like this:
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
where $args – array of parameters.
The problem is that one of the parameters has its value starting with “@”. And according to CURL documentation, that means that I’m going to send a file. Which is not true in my case.
As a result I get the following error message: failed creating formpost data.
Is there a way to specify whenever I want to send a file or “@” is just a regular character that is part of some value?
Thanks,
Gena
Could you use percent encoding instead? That way your ‘@’ symbols would be %40 and CURL won’t mess with them. We usually percent encode all our post fields.
http://en.wikipedia.org/wiki/Percent-encoding