linux - Posting data to a form cURL -
i trying post data form using curl , save in file , here form in want post data , webpage can accessed here form_webpage
<label for='fldname'>name</label></td><td>:</td><td><input type='text' name='name' id='fldname'/> <label for='fldemail'>email</label></td><td>:</td><td><input type='text' name='email' id='fldemail'/> <input type='password' name='x' id='fldpwd'/> <input type='password' name='cpwd' id='fldcpwd'/> <input type='radio' value='m' name='gender' id='fldgendm'/> <label for='fldgendm'>male</label> <input type='radio' value='f' name='gender' id='fldgendf' /> <label for='fldgendf'>female</label> <input type='checkbox' value='e' name='lang[]' id='fldlange'/> eng <input type='checkbox' value='t' name='lang[]' id='fldlangt'/> tel <input type='checkbox' value='h' name='lang[]' id='fldlangh' disabled /> <select name='coun' multiple > <option value=''>choose country</option> <option value='91'>india</option> <option value='001'>usa</option> <option value='002'>united kingdom</option> </select>
i have done quite bit of research , everytime want post form returning same page used
curl --data 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91' "www.cs.odu.edu/~stirumer/index.html" -o "3.html" curl -gd 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gen der=m&lang[]=e&coun=91' "www.cs.odu.edu/~stirumer/index.html" -o "3.html" curl -x post -f 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91' www.cs.odu.edu/~stirumer/index.html -o "2.html" curl -f 'name=stirumer&email=123@gmail.com&x=test&cpwd=test&gend er=m&lang[]=e&coun=91' www.cs.odu.edu/~stirumer/index.html -o "1.html" curl -x post --data "name=stirumer&email=123@gmail.com&x=test&cpwd=test&gender=m&lang[]=e&coun=91" www.cs.odu.edu/~stirumer/index.html
all of them return same page..!!
expected output
need guys!
here's 1 way go this, i've found quite useful similar activities.
in firefox install firebug , firecurl. start firebug, , browse page in question, , submit form. in net panel of firebug, @ firecurl output. gives curl command line form submission, can cut , paste shell , execute. way learn needs done post.
Comments
Post a Comment