I am trying to create VB app that "mimics" a form submission to upload a file. I need to figure out exactly what the form is actually "submitting" to the php script, so I can duplicate this info in my VB app.

Can anyone explain how (or provide the code) to show the header info I need?

Example of what I'm trying to do:

(START part that the VB app will do)
1. I created a html form that allows two files to be selected, and a few text boxes.

  1. I submit the form by pressing the button.
    (END part that the VB app will do)

  2. The php script (I need some help with this part) executes and outputs the received HTTP post info that was sent.

Thanks!

    print_r($_REQUEST)

    print_r($_FILES)

    ... shows you what came in w/ the HTTP request. also $_SERVER['ALL_HTTP'] if you wanna get down+dirty there. check 'em out. I routinely put

    print_r($_REQUEST)
    exit()

    ... at the beginning of form-receiving PHP pages for debugging, which I comment out or erase for production. yeah.

    -fish

      Yes, actually I already did all that.. the problem I am having is that I need to "mimic" a form submission that includes several files.

      In other words, the server var's and other goodies shown using the $_GLOBAL array only gives me the results.. I actually need to:

      1) Fully replicate what the html form/browser is doing.

      2) Write a script that will work with the VB program which will accomplish #1.

      Does that make sense? Any ideas? I guess I need to figure out how to do #1 first, and then see what happens for #2..

        aha well I don't know VB but if you can use it to open sockets you can build a multipart/form-data POST request yourself and then send that. I'm sure VB has all sorts of fancy MS objects that do that sort of thing but if you want total control you could do it w/ sockets. are you asking that? what the POST request looks like with files? I can tell you that it looks a lot like a MIME email, with boundaries and base64 encoding. sorry I'm not much more help than that, erm yeah.

        -fish

          Write a Reply...