Saturday, June 22, 2013

POST request to the server using Terminal (Linux)



POST request to the server using Terminal 



curl -d "parameter1=value1&parameter2=value2" page_url

  Example:
 
  page located at http://www.formpost.com/getthis/
 
        <form action="post.cgi" method="post">
        <input name=user size=10>
        <input name=pass type=password size=10>
        <input name=id type=hidden value="blablabla">
        <input name=ding value="submit">
        </form>
 
  We want to enter user 'foobar' with password '12345'.
 
  To post to this, you enter a curl command line like:
 
curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" http://www.formpost.com/getthis/post.cgi

No comments:

Post a Comment

Total Pageviews

Translate