You are here: Re: Binary? I don't know « PHP Programming Language « IT news, forums, messages
Re: Binary? I don't know

Posted by Gertjan Klein on 12/17/68 11:52

Lee wrote:

>There is something I didn't mention: I am getting the POST from a java
>applet, not a form.
>What's happening is that I created a jpeg inside the program, made a
>string out of it, converted it with urlencode, and then made a post
>request.

If you are really doing a POST (as opposed to a GET), then why would you
urlencode it? Posted data can basically be anything, including binary
data. I suggest trying to remove the urlencode in the java applet, and
check if that works. If not, the first thing to find out is where
exactly things go wrong. You can use a tool like tcptrace to monitor
what is being sent by your applet.

Probably the best thing to do is to try and mimic what a browser sends
when a file is being uploaded. That way, php will manage any encoding
you use (in this case, you do have to use an encoding, perhaps base64),
and save the data in a file for you.

HTH,
Gertjan.
--
Gertjan Klein <gklein@xs4all.nl>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация