I have 2 pages: xyz.com/a and xyz.com/b. I can only access xyz.com/b if and only if I login to xyz.com/a first. If access
My answer is a mod of some prior answers from @JoeMills and @user.
Get a cURL command to log into server:
Modify cURL command to be able to save session cookie after login
-H 'Cookie: ' curl at beginning -c login_cookie.txt'login_cookie.txt' in the same folderCall a new web page using this new cookie that requires you to be logged in
curl -b login_cookie.txt I have tried this on Ubuntu 20.04 and it works like a charm.