Need some help PHP bot

tantanleblanc

Newbie
Joined
Dec 16, 2009
Messages
3
Reaction score
0
I got the same problem as someone on stackoverflow and I don't see anything in the answers that can help me a little. So I paste his text here because I can't explain better my problem, if anybody has some ideas. I think I have a problem with the multipart/form-data but I'm not really sure about it. The only output I get after posting the data is :
"The CAPTCHA answer provided is not correct. Please go back and try again."
(it's recaptcha). But, I know the answer is not wrong and it should work because I got no problem with it on regular forms. So here is the post of Stackoverflow :

Hi am trying to post some data on a website using CU RL. The posting process has 3 steps. 1. enter a U RL, submit and get to the 2nd step with some fields already completed 2. submit again, after you entered some more data and preview the form. 3. submit the final data.

The problem is that after the second step, the form data looks like this :
Code:
POSTDATA =-----------------------------12249266671528
Content-Disposition: form-data; name="title"

Filme 2010, filme 2009, filme noi, programe TV, program cinema, premiere cinema, trailere filme - ss s. co
-----------------------------12249266671528
Content-Disposition: form-data; name="category"

3
-----------------------------12249266671528
Content-Disposition: form-data; name="tags"

filme, programe tv, program cinema
-----------------------------12249266671528
Content-Disposition: form-data; name="bodytext"

Filme 2010, filme 2009, filme noi, programe TV, program cinema, premiere cinema, trailere filme
-----------------------------12249266671528
Content-Disposition: form-data; name="trackback"


-----------------------------12249266671528
Content-Disposition: form-data; name="url"

ss s. co

-----------------------------12249266671528
Content-Disposition: form-data; name="phase"

2
-----------------------------12249266671528
Content-Disposition: form-data; name="randkey"

9510520
-----------------------------12249266671528
Content-Disposition: form-data; name="id"

17753
-----------------------------12249266671528--

I am stuck trying to devise an algorithm that will generate this kind of POST data for the second step. Just to mention the URL of the form never changes. The url finishes by /submit. There is only a hidden input called "phase" that changes according to the step i am currently on (phase = 1, phase = 2, phase = 3). Any help, be it either code, pseudo-code or just guidance would be greatly appreciated.
 
Thanks for the help.

The issue came from a problem on the site I was testing on. It was working on any other site. Thanks for the answer anyway. I wasted 10 hours trying to understand where the problem was...
 
Back
Top