I have an HTML page on which several links are there, I want to click one link and that will download relevant file for me. How do I simulate this using curl. All links have different name attribute
closed as unclear what you're asking by Caleb, jasonwryan, Anthon, slm♦, peterph Jun 23 '14 at 13:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
When you click a link in a browser it creates a http request with not only the path to the link but information such as to the identity of the browser, language, cookies and many other values the server may choose to use(or ignore).
curl will allow you generate a complete http request with all the same values as if it was created by the browser. Bottom line is the server will not be able to tell a well crafted curl request from a browser.
curl the command line utility does not interact directly with GUI applications like web browsers.
curl capabilities extends far beyond just sending http requests. I use it mainly to fake calls to web services from mobile apps.
You might like to also look at libcurl http://curl.haxx.se/ which could be added to other products that could interact with other apps.