tags:

views:

269

answers:

0

hi experts, i got stuck during my project, need bit of your advice to find correct path.

here is what i am doing in my php code. 1)my script create account on third party website(i have no control over this website)

2)there are 5 forms which i have to submit one by one to create account.

3)ii have successfully created code to submit first two forms and after submitting second form , i am getting third form in my response in script.

4)but when i am submitting data for third form, i am getting response in red text that "Please fill up all fields", i am getting this error message, which means that my code is submitting values to "action" form of third form, but some how its not accepting it or may be possible, my curl doing something wrong while sending data.

all 5 forms are accepting data of content-type "multipart/form-data" and thats y i am sending all my data in array and assigning that array to "CURLOPT_POSTFIELDS".

following is data send by browser to "action" script of form 3.

    -----------------------------792694871670
Content-Disposition: form-data; name="1"

(Car#21)
-----------------------------792694871670
Content-Disposition: form-data; name="2"

(Car#22)
-----------------------------792694871670
Content-Disposition: form-data; name="3"

(Car#23)
-----------------------------792694871670
Content-Disposition: form-data; name="4"

(Car#24)
-----------------------------792694871670
Content-Disposition: form-data; name="5"

(Car#25)
-----------------------------792694871670
Content-Disposition: form-data; name="6"

(Car#26)
-----------------------------792694871670
Content-Disposition: form-data; name="7"

(Car#27)
-----------------------------792694871670
Content-Disposition: form-data; name="8"

(Car#28)
-----------------------------792694871670
Content-Disposition: form-data; name="9"

(Car#29)
-----------------------------792694871670
Content-Disposition: form-data; name="10"

(Car#30)
-----------------------------792694871670
Content-Disposition: form-data; name="19.0.x"

42
-----------------------------792694871670
Content-Disposition: form-data; name="19.0.y"

9
-----------------------------792694871670--

and following is array i am posting using curl.

$data_arry3["1"]="(Car#21)";
$data_arry3["2"]="(Car#22)";
$data_arry3["3"]="(Car#23)";
$data_arry3["4"]="(Car#24)";
$data_arry3["5"]="(Car#25)";
$data_arry3["6"]="(Car#26)";
$data_arry3["7"]="(Car#27)";
$data_arry3["8"]="(Car#28)";
$data_arry3["9"]="(Car#29)";
$data_arry3["10"]="(Car#30)";
$data_arry3['19.0.x']="58";
$data_arry3['.0.y']="4";

as far as i know, session,cookies and ref everything seems ok because, i am able to submit first two forms.

i think problem is in data being send by curl to that server, something has changed by curl in data before sending to server, the reason i am saying this name of fields are numbers not alphabet. may be i am wrong.

so experts any one can let me know whats i am doing wrong?? any advice will sure take me out of this.

please if any question do let me know.