Re: Reading binary http post

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

 



"Dirk Vanden Boer" <dirk.vdb@xxxxxxxxx> wrote in message 
news:67.98.45151.2CE5BF34@xxxxxxxxxxxxxxx
> Hi,
>
> I have a C++ application that posts binary data to a php script that I 
> created using libcurl. Everything works fine except when my binary data 
> happens to start with the '&' symbol. In that case I can't read the http 
> post data (isset returns false).
>
> The post argument then looks like data=&ÑÚA
> Reading the post is done like this:
> if (isset($_POST['data'])
> Is there a way to fix this problem?

A quick-n-dirty method is to prepend a known letter to the data, like an 
"A":
data=A&ÑÚA
Then, ignore the first character of the data, since it is known to be the 
"A" character.

I would think that if the data contains an "&" in the middle of the data, 
you may not be getting all the data.
"data=ABC&xyz=123"
$_POST['data'] = "ABC"
$_POST['xyz'] = "123"

DanB

-- 
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