#Bash and Curl
###cURL
Record an mp3 stream to a file:
$ curl http://example.com/stream.mp3 -o file.mp3
http://stream1.opb.org/kmhd_web.mp3
Options
-s/--silent
Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.-f/--fail
(HTTP) Fail silently (no output at all) on server errors...-k/--insecure
(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers.
GET method
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
POST method
curl --data "param1=value1¶m2=value2" http://example.com/resource.cgi
curl --data-urlencode "name=I am Daniel" http://www.example.com
Post with header:
curl --header "x-myheader: my value" --data "param1=value1" http://example.com/resource.php
To post an array, use this:
curl --data "meta[key1]=value1&meta[key2]=value2" http://example.com/controller/method