cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl question (form php and variables)

From: DannyTheGreat <dannythegreat.gamer_at_gmail.com>
Date: Mon, 31 Oct 2016 16:51:54 +0100

Hello,
I have a question inherent to Curl command, I'm interested to download a
file with CURL by batch command, the url of the file is this
http://www.armaholic.com/page.php?id=30431. The file is generated by click
"submit" form. I have tried more options, and my command is this:

>
> curl -v --data-urlencode "captcha=I%%20am%%20a%%20human^!&submit=Click%%20
> to%%20download%%20=BTC=%%20Militia" --header "User-Agent: Mozilla/5.0
> (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/54.0.2840.71 Safari/537.36" "http://www.armaholic.com/
> page.php?id=30431" -o "BTC-Militia-version-1.1.7z" -L
>
> I have wrote %%20 for space instead %20 because I have seen that the batch
command don't send correctly %20 but only "0" and the "!" symbol if not
comprensive of "^!".

The form inside the page is this:

<form method="post" action="http://www.armaholic.
> net/downloader.php?download_file=chili/addons/units/BTC-
> Militia-version-1.1.7z"><div style="display:inline;margin:0;padding:0"><input
> type="hidden" name="x" value="3910CD8F"></div>
> <div class="hide-s">
> <label for="super">What is two plus two?</label>
> <input name="super" type="text" size="4" id="super"></div>
> <input type="hidden" name="captcha" value="I am a human!">
> <input type="submit" name="submit" value="Click to download =BTC= Militia">
> </form>

I must simply fill the form values, "captcha = I am a human!" and "submit =
Click to download = BTC = Militia".

What am I doing wrong? Can you help me? My command is for Win Batch Command.

Sorry for my english. Thank you.

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-31