Re: cURL and sending an POST with an @ as first char.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mathijs wrote:
Mathijs wrote:

Hello there,

I Have a question about cURL and sending POST data.

I have an array with values which are needed for an POST.
There is one value which starts with an @.
This gives me a error: ErrorNo.: 26, ErrorMsg: 'failed creating formpost data'.

This is becouse an @ at the start of a value is treated as an File upload or something.

I realy need this to be an @ at the start, and i can't add an space infront of it.

How can i fix this.
Tryed searching cURL's website didn't found anything (yet).

Thx in advance.


It seems that i have found a fix.
I Now check if it starts with an "@" and the replaces it with "\@".
Then it will send normaly :).

If anyone has an other sulution, please tell me.

it's called "escaping meta-characters", @ has a special meaning, \@ (the escaped version of @) is the literal @ character. the same way as ' in many languages is also a special character, \' is its counterpart, the literal quote. So, no, there shouldn't be "another solution" since your solution is the correct one.

- tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux