Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- new to php ... POST variables?
- grande news
May 7, 2006, 10:30 pm
rate this thread
I am trying to send a bunch of data via a single POST message, from a
wireless device to a PHP script on my server. Some of this data is
base64_encoded binary image data. Basically, I want to send a series of
small icons, and each has a width, height, and the pixel data. So I am
sending the following strings via a Socket connection:
"POST http://www.mydomain.com/processicons.php HTTP/1.0\n"
following this I send the base64 encoded data for the image. Then "\n\n" to
end the POST.
This works for a single image, but if I want to send multiple images in the
same post, it doesn't work. What I tried is just incrementing my variable
names and adding for example "&width2=32&height2=32&data2=blahblahblah" over
and over again for all the images I want to send, eventually followed by the
'\n\n'. However, in my php script I tried printing out all of the _POST
variables it receives, and it seems like everything after that first 'data'
variable is just being lost, or maybe included in the image data? I don't
I thought that the '&' symbol should tell the script that a new variable has
come along. And the base64encode doesn't use that symbol, I don't think.
Maybe it does and that it my problem?
Thanks for any suggestions
- » Trying to build PHP 4.3.0 with Apache 2.2.2 on SUSE 9.1
- — Previous thread in » PHP Scripting Forum