post - Send random value with curl to server -


let's have html form looks this:

<form method="post" action="anmeldung.fcgi" onsubmit="return chkform()">     <input type=text name="person">     <input type=hidden name="id" value="1234"> <!-- value generated -->     <input type=submit name="press" value="ok"> </form> 

the value id generated mechanism not known , every time visite site other value. let's script, collects data checks if id correct , rest of code called.

is there way curl send data correct id server? can read out page , send server anyway? think have use same "instance" of html file or this?

it sounds multi-step process, scripted easily. first, use curl url of form, so:

curl http://hostname/path/to/form.html 

then, parse content returned above request, pull value stuffed in hidden id field.

then, use curl post anmeldung.fcgi, setting form inputs posted, so:

curl --data "person=xxx&id=1234&press=ok"  http://hostname/path/to/anmeldung.fcgi 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -