curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: can't login with curl in forum

From: Daniel Stenberg via curl-users <curl-users_at_cool.haxx.se>
Date: Wed, 13 May 2020 12:15:41 +0200 (CEST)

On Wed, 13 May 2020, mierdatutis mi via curl-users wrote:

> -H 'Content-Type: application/x-www-form-urlencoded' \

This is default set by curl with -d, you can drop this.

> -H 'Cookie: __unam=913965-17172e02dcf-11b0effe-2;
> __utmz=106217502.1589268314.45.33.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided);
> __utma=106217502.805468631.1585552618.1589348787.1589353702.55;
> __utmc=106217502; PHPSESSID=n9etr6p57k84c6gqo6dj0q8n3t; __utmt=1;
> __utmb=106217502.43.10.1589353702' \

It seems very unlikely that your command line can just reuse the same cookies
your browser used. I advice you to fetch the login page with curl first and
store a fresh set of cookies generated for you (with -c) and then use those in
the login submission (with -b).

> --insecure

Don't use insecure. Let curl verify the server's cert!

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-13