Skip to content
Advertisement

Tag: cookies

Laravel : Set cookie for parent domain

I’m trying to build an SSO that will be shared between different applications with the same parent domain. Say we have these domains : sso.example.com Unified login page app1.example.com Some other application that will redirect to the login page When I set SESSION_DOMAIN=.example.com in .env file of the SSO project, the cookie is indeed set in parent domain and is

What does this cookie line mean? (time()+1*24*60*60;)

I have a php code that says this time for the cookie to expire What exactly does this mean? Answer As hinted to in the comments – that’s a calculation of seconds from the current time. That’s 1 day (86400 seconds). 7 Days could be calculated similarly as: You can find a lot more explanation and examples in the PHP

PHP: CURL fails to save cookie

I am using PHP from one host to connect to the API of another on the same subnet, which requires cookies to remember the login. It gives me a WARNING: failed to save cookies in /var/includes/cookie. I set up a short test script for myself as follows: The verbose log file gives me this output: The contents of $output itself

Cookie is not recognised in PHP

I get Notice: Undefined index: i during the first reload of page with cookies if( (isset($_COOKIE[“i”])) && !empty($_COOKIE[“i”]) ){ setcookie(“i”,$_COOKIE[“i”]+1); } else{ …

Advertisement