python - login to phpBB using curl
Get the solution ↓↓↓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.
I don't want to make this question complicated, so I'll not write code here, so everybody python, javascript, php, java or any other folks can answer this question.
here is what I did:
- create a file on the desktop called
cookie.txt
- 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!
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to undefined function str_contains()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.