Camen Design Forum

Submit problem. With POST data in URL opening a thread

append delete Jos

I need to create a thread by an URL from another script, or form.
So if i call "http://www.mysite.com/forum/index.php?path=MyForum/" and specify f.ex. "$myvars = 'title=TITEL&text=TEKST BESKRIVELSEN&username=ROLO&password=ROLO';" with the help of *curl*, i get the form prefilled with exactly what i whant.

My problem is *how do i submit the data ?*
Its probably very simple but i seem not to be able to do it. Someone has the solution or can point me at the correct direction?

I intend to use this for commenting on blog entry's. I could use hashover or something similar but nononsense is a nicer solution and fits my needs.

/José

Reply RSS

Replies

append delete #1. Martijn

You want to enable submitting through `cURL`? What is wrong with using `--data` [1] to emulate submitting a web form?

[1]: https://curl.haxx.se/docs/manpage.html#-d

append delete #2. Jos

I allready got *curl_setopt( $ch, CURLOPT_POST, 1);*

I set params for title, text, username, password . Am i missing one ?
I can see that i get all the info into the form. The broblem is that it does not get submitted.

:: @Jos added on 26 Jun ’16 · 21:54

Tryed $ curl --data 'title=TITEL&text=TEKST BESKRIVELSEN&username=ROLO&password=ROLO' http://www.mysite.com/forum/index.php?path=Andre%20fora/

and got exactly same behaviour as with PHP; as expected.
There must be something with the way a form is submitted with nononsense forum.

I'll try again the comming days and will post the solution.

append delete #3. Martijn

I don’t see any reason why you would not be able to post through cURL. All I can think of is that you are running into the anti-spam-bot traps. And as @Kroc has chosen to be vague about those, I am not going to document them here either. Look at the code, is the best I can say.

append delete #4. Jos

I did forget to specify the "correct" email adress. But it's not it. I'm only aware of the fake email as a honeypot. I've looked trough the code and did not find other traps.

append delete #5. Martijn

I don’t know what to tell you if I am to stay vague, but the form submits more than that. Maybe look at the POST request you are sending when posting here?

append delete #6. Jos

Thanks Martijn.
I was very stupid just to look at the form and the code, and should have looked at the direction you just stated.
Everything *works fine* and as expected now.

I would like to share the answer but its probaly counterproductive so i will not.

Greetings
/José

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn