tags:

views:

46

answers:

1

There is a button in a site like this:

<form method="POST" action = "/invite/1233">
   <input type="hidden" name="t" value="4b16d">
   <button type="submit">submit</button>
</form>

How can I "emulate" pressing this button for example in bash? Is it possible to make an adress that I can click instead of this button? Why http://site-domain-here/invite/1233?t=4b16d doesnt work?

+3  A: 

On your terminal, assuming you have curl installed (who doesn't?), run:

curl -d "t=4b16d" http://site-domain-here/invite/1233

The -d option means that the request will be made with POST.


In response to your addition to your question:

Why http://site-domain-here/invite/1233?t=4b16d doesnt work?

This is because by following the link above you are by default issuing a GET request; not a POST request with post data which is what the web page/service requires.

See http://en.wikipedia.org/wiki/Hypertext%5FTransfer%5FProtocol#Request%5Fmethods for an explanation of the various HTTP request "verbs".

Ben James