Re: Using a string starting with @ in a POST
Stephen Pynenburg <[email protected]>
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <[email protected]> |
Not an expert opinion as far as the C API goes, but a PHP trick that often works for me... one suggestion off the top of my head would be to try using double quotes for your post string and then escape the @ with a \ . -Stephen On Fri, Oct 1, 2010 at 11:41, <[email protected]> wrote: > Hello everybody > > i'm coding an application which use the twitpic api. > I have to send three postdata $var which are > key = my api key > message = a message (string) > media = @/file/to/upload > > Great, but my message is often "@twitteruser here is the photo !" (without > "), and so curl try to find a file and return a > "failed creating formpost data" > I tried to urlencode and rawurlendode the $message var, it works, but > twitpic doesn't decode it correctly > Is there a way to pass a string starting with @ whithout having curl try to > process it as a file ? > > (see what happen when using urlencode($message) : > http://twitpic.com/2tngrw > > ) > > Thanks > _______________________________________________ > http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php > > _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php