Hack Forums
[C] anyone experienced with libcurl? C++ - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] anyone experienced with libcurl? C++ (/showthread.php?tid=5908847)



anyone experienced with libcurl? C++ - pmtobefriend - Nov 17, 2018

Hello, I'm in need of help with libcurl. As I'm not understanding how to do something, even after reading the documentation.
So I basically want to log into a website, and then perform a task of my choice being logged into the account.

I am capable of logging in, and having the cookies saved in a .txt of my choice.
using cookiejar to store cookies in the .txt
https://curl.haxx.se/libcurl/c/CURLOPT_COOKIEJAR.html
and cookiefile to read the cookies and implement them into the next request
https://curl.haxx.se/libcurl/c/CURLOPT_COOKIEFILE.html



I would like to log into an account, and have the cookies saved into the memory, without having to put them in a .txt , and then load it from the .txt
How would I do so?

I've read the following on COOKIEFILE "Given an empty or non-existing file or by passing the empty string ("") to this option, you can enable the cookie engine without reading any initial cookies."


so I do it, but it doesn't work, doesn't let me stay logged in after the first request.
help is appreciated 🤝