cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Submitting form with strange __multiselect parameters

From: Oscar Vidal <oscarblo_at_gmail.com>
Date: Wed, 7 Aug 2013 17:02:20 +0800

Hi!

I'm trying to submit a (java servlet) form using CURL in PHP, but it seems
like there is a problem with the parameters. I cant really understand why
its happening since I'm testing the CURL with a identical string parameters
that is being used by the browser.

After some research in diverse forums I wasn't able to find a solution to
my particular problem.

this is the POSTFIELDS string generated by the browser (and working):

submissionType=pd&__multiselect_PostCodeList=&selectedPostCode=01&selectedPostCode=02&selectedPostCode=03&__multiselect_selectedPostCodes=

and I'm using and identical (for testing) string in the PHP script but it
im getting a HTML file as a answers telling "Missing parameters in search
query".

I believe that the form

__multiselect_PostCodeList=
&selectedPostCode=01
&selectedPostCode=02
&selectedPostCode=03
&__multiselect_selectedPostCodes=

is quite wired (never see before this) and I'm wondering that it can be the
reason of why the post is not working from CURL.

The form seems to be successfully submitted since I'm getting this header

HTTP/1.1 200 OK
Date: Wed, 07 Aug 2013 08:02:56 GMT
Content-length: 1791
Content-type: text/html;charset=UTF-8
X-Powered-By: Servlet/2.4 JSP/2.0
Vary: Accept-Encoding
Content-Encoding: gzip
Connection: Keep-Alive

Note: I tried submitting the same form from *Lynx* and I'm also getting the
same result ("Missing parameters in search query"). So it seems like its
only working with browsers like Mozilla or Chrome.

Please some help will be really appreciated, I don't have any more ideas at
this point.

Thanks! Oscar

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2013-08-07