I want to login using curl to a phpBB forum.
I’m testing my script of loggin in on https://forums.linuxmint.com/ucp.php?mode=login
you can test it there too.
here is what I did:
- create a file on the desktop called
- open the terminal (I’m using linux with bash shell by the way)
- I wrote this command and I hit enter
curl -b ~/Desktop/cookie.txt -c ~/Desktop/cookie.txt -X POST -F "username=YOUR_USER_NAME" -F 'password=YOUR_PASSWORD' "https://forums.linuxmint.com/ucp.php?mode=login"
I requested a page that require users to be logged in, here is one
curl -b ~/Desktop/cookie.txt -c ~/Desktop/cookie.txt "https://forums.linuxmint.com/memberlist.php?mode=viewprofile&u=62313"
- I read the output, and it’s not working.
- How did I know that it doesn’t work?
A) just look at the page
<title>, in the response of curl in the terminal, the
<title> is Linux Mint Forums – Login, which means that the login is not successful for some reason.
anyone knows can help? any answer is appreciated!
Source: Ask PHP