I want to emulate this form :

Christopher Schultz

You have to synthesize the whole multipart-formdata response.

There's a specification for it, which includes the headers and something called a part boundary which is basically a horizontal line which says "this is the separation betwen parts". Then, you put that exact same boundary between each of the parts, and have to declare the name, type, and length of each part of the response.

It's pretty tedious.

I know that one of the O'Reilly books on either HTML or DHTML, etc. has a section in it that describes exactly what the response looks like. Having a look at this might help you in getting this to work.