curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Select a specific entry from the form drop-down list and submit it with curl.

From: Dan Fandrich via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 11 Jan 2021 09:30:35 -0800

On Mon, Jan 11, 2021 at 09:31:06PM +0800, Hongyi Zhao via curl-users wrote:
> My fiber optic modem has exposes user a URL
> (http://192.168.1.1/hidden_version_switch.gch) for its specific
> firmware version selection. On the opened webpage, I can select a
> specific entry from the form drop-down list and submit it. See the
> screenshot in the attachment for more details.
>
> I'm not sure if I can do this job programmatically with curl. Any
> suggestions/hints will be highly appreciated.

It's highly likely you can. I would start by performing the operation in your
browser then using its "Copy as curl" feature to create an equivalent version
of the operation using the curl command-line. That may be sufficient, or it
should at least give you enough information to craft an optimized version
yourself. It's likely there's Javascript involved so tracing the source
manually may be difficult. Also, look at the page
https://curl.se/docs/httpscripting.html for more hints to accomplish this.

Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-01-11