Use Curl to Login to a Site with Cookie Sessions
In "batch" (MS DOS) syntax
curl "http://mysite.com/login" ^
    --data-urlencode "rememberMe=true" ^
    --data-urlencode "email=aturing@foobar.com" ^
    --data-urlencode "password=secretpassword" ^
    --cookie "cookies.txt" ^
    --cookie-jar "cookies.txt" ^
    --location ^
    --verbose ^
    > "login_log.html"
curl "http://mysite.com/admin" ^
    --cookie "cookies.txt" ^
    --cookie-jar "cookies.txt" ^
    --headWritten by Jason Seney
Related protips
1 Response
Not working to log in into deezer, can u help me at this point? Thanks by the way
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Shell 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#

 
 
 
 
