Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_cookiesession(3) [mojave man page]

CURLOPT_COOKIESESSION(3)				     curl_easy_setopt options					  CURLOPT_COOKIESESSION(3)

NAME
CURLOPT_COOKIESESSION - start a new cookie session SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init); DESCRIPTION
Pass a long set to 1 to mark this as a new cookie "session". It will force libcurl to ignore all cookies it is about to load that are "ses- sion cookies" from the previous session. By default, libcurl always stores and loads all cookies, independent if they are session cookies or not. Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only. A "session" is usually defined in browser land for as long as you have your browser up, more or less. DEFAULT
0 PROTOCOLS
HTTP EXAMPLE
TODO AVAILABILITY
Along with HTTP RETURN VALUE
Returns CURLE_OK SEE ALSO
CURLOPT_COOKIEFILE(3), CURLOPT_COOKIE(3), libcurl 7.54.0 February 03, 2016 CURLOPT_COOKIESESSION(3)

Check Out this Related Man Page

CURLOPT_COOKIE(3)					     curl_easy_setopt options						 CURLOPT_COOKIE(3)

NAME
CURLOPT_COOKIE - set contents of HTTP Cookie header SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie); DESCRIPTION
Pass a pointer to a zero terminated string as parameter. It will be used to set a cookie in the HTTP request. The format of the string should be NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie should contain. If you need to set multiple cookies, set them all using a single option concatenated like this: "name1=content1; name2=content2;" etc. This option sets the cookie header explicitly in the outgoing request(s). If multiple requests are done due to authentication, followed redirections or similar, they will all get this cookie passed on. The cookies set by this option are separate from the internal cookie storage held by the cookie engine and will not be modified by it. If you enable the cookie engine and either you've imported a cookie of the same name (e.g. 'foo') or the server has set one, it will have no effect on the cookies you set here. A request to the server will send both the 'foo' held by the cookie engine and the 'foo' held by this option. To set a cookie that is instead held by the cookie engine and can be modified by the server use CURLOPT_COOKIELIST(3). Using this option multiple times will only make the latest string override the previous ones. This option will not enable the cookie engine. Use CURLOPT_COOKIEFILE(3) or CURLOPT_COOKIEJAR(3) to enable parsing and sending cookies automatically. The application does not have to keep the string around after setting this option. DEFAULT
NULL, no cookies PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_COOKIE, "tool=curl; fun=yes;"); curl_easy_perform(curl); } AVAILABILITY
If HTTP is enabled RETURN VALUE
Returns CURLE_OK if HTTP is enabled, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. SEE ALSO
CURLOPT_COOKIEFILE(3), CURLOPT_COOKIEJAR(3), CURLOPT_COOKIELIST(3), CURLOPT_HTTPHEADER(3), libcurl 7.54.0 December 21, 2016 CURLOPT_COOKIE(3)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Keep alive packet for control session in ftp data transfer

I'm new to UNIX. We are using SunOS5.9. In order to maintain the control session active during large file tranfers in ftp, i like to send keep alive packets for every 10 seconds.I like to know the steps to be done to achieve this. Please help me guys.Thanks in advance. (0 Replies)
Discussion started by: rpr
0 Replies

2. HP-UX

ssh session getting hung (smilar to hpux telnet session is getting hung after about 15 minutes)

Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies

3. Web Development

PHP Help - Delete cookies and redirect back to referrer

I was wondering if any one would be willing to help me with this. I'd like to create a 503 error page using a PHP script that will do the following: - delete all cookies that contains 'something' in the host and 'JSESSIONID' as the cookie name. There are either 1 or 2 cookies that each... (0 Replies)
Discussion started by: Adrnalnrsh
0 Replies

4. Shell Programming and Scripting

PHP Help - Delete cookies and redirect back to referrer

(0 Replies)
Discussion started by: Adrnalnrsh
0 Replies

5. UNIX for Dummies Questions & Answers

Running Putty from Browser

Hey All, My first posting around here, So please be patient with me. I dont have any rights on a computer that Im using right now & I was wondering if I can run putty session from the browser itself without downloading it. I looked up all over the web & I couldnt really see a place... (1 Reply)
Discussion started by: Fanxinu
1 Replies

6. Shell Programming and Scripting

wget - cookie with expiration date

How can I create a cookie with expiration date using either wget or curl? I am able to use cli wget, cli curl, or php curl. I don't see that the cookies I have created contain an expiration date, and I have a problem logging into a forum that looks for the expiration date. (2 Replies)
Discussion started by: locoroco
2 Replies

7. Shell Programming and Scripting

Problem with wget and cookie

Dear people, I got a problem with an scrip using wget to download pdf-files from an website which uses session-cookies. Background: for university its quite nasty to look up weekly which new homeworks, papers etc. are available on the different sites of the universites chairs. So I wanted a... (1 Reply)
Discussion started by: jackomo
1 Replies

8. What is on Your Mind?

Changed Forum Cookie Prefix (You May Need to Reload Your Cache)

Today we changed the prefix of our cookie and cleared the session table and all is working fine, at least on my end because I cleared my browser javascript cache. If you experience any strange behavior (you should not), please clear your javascript cache before posting a bug here. Note: I... (0 Replies)
Discussion started by: Neo
0 Replies

9. What is on Your Mind?

Individual Risk Management (Personal IT Security) and Browser Cache Management

Original post from this thread on browser caching. To add to this, it is an effective security measure to clear absolutely all cached data (cookies, web content, ....) when closing the browser - i.e. in case of a shutdown. It takes a bit of work to re-login to all the sites but websites will not... (7 Replies)
Discussion started by: bakunin
7 Replies