Re: Reading binary http post

From: Date: Tue, 21 Feb 2006 19:05:50 +0000
Subject: Re: Reading binary http post
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230823@lists.php.net to get a copy of this message
"Dirk Vanden Boer" <dirk.vdb@gmail.com> wrote in message news:67.98.45151.2CE5BF34@pb1.pair.com... > 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

« previous php.general (#230823) next »