I need to login to a page and then submit an entry. i'm able to login with the following code
curl $HOST -s -L -b $COOKIE -c $COOKIE -d "login=submit&login_name=$USER&login_password=$PASS" -o $OUTPUT
but when i try to submit an entry i'm not logged in anymore
curl $HOSTADDNEWS -L -b $COOKIE -c $COOKIE -A $HEADER -d "title=$TITLE" -o $OUTPUT.add.news
How to retain cookies between requests?
Thanks to Daniel Stenberg! $COOKIE variable had a "slash" in it... it still saved to file but wasn't able to use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With