Curl to hit the submit button

Hello,

I am looking to hit a URL using curl and click on submit button so that I can get the results. The below is the code

            <input name="tos_accepted" id="tos_accepted" class="button" type="submit" value="Yes, I Agree"/>
            <input name="tos_discarded" id="tos_discarded" class="button right_button" type="submit" value="No, I Do Not Agree"/>

I am trying the following and it is not working. The button "Yes, I agree" need to be clicked.

curl -d "tos_accepted=tos_accepted&submit=Yes,%20I%20Agree" "http://url/"

Please help.

Hello Kochappa,

Not sure but if you are using CGI scripting for same if yes, then you can make a second CGI script in which you can call the same and make sure you are using the correct syntax for calling on a button clicking as clicking on button is an event.

Thanks,
R. Singh