curl -c cookies.txt "http://foo.bar/login.php" -d "USER=34568" -d "PASS=1234"
curl --cookie cookies.txt "http://foo.bar/file.csv" -o file.csv
rm cookies.txt
-d
for HTTP POST parameters
-c
stores a cookie (if file does not exist), or transmits a cookie (if file exists)
-o
stores the response in a file (instead of a terminal output)
via -H
examples:
-H "Accept-Languate: en-US,en;q=0.5"
-H "Accept-Encoding: gzip, deflate"
##Send refferer:
-e "http://foo.bar/site.php"
##Fake User-Agent:
-A "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"