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

Posted by Lee on 10/18/29 11:52

The only way that the entire string would transfer in the post request
was if I used urlencode.
(this is where I was talking about the java applet if you're curious:
http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/349dd4ca861b228b?hl=en
)

I have another clue to the puzzle in case it helps. If I view the
string in notepad, it looks like what I want. However, if I view it in
any other application (e.g. wordpad or firefox), it looks like what I
posted. This is a major reason why I think this is something like a
"binary" problem.

Gertjan Klein wrote:
> 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

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