cookies

Is HttpCookie.Name the same as the string in Response.Cookies[string]?

Meaning I create a cookie with .Name = "ChocolateChip" then later I would look for it by being like: Response.Cookies["ChocolateChip"]... ? ...

Codeigniter Cookies Help

Hello in codeigniter how would I check if the user is visiting the site for the first time, and if they are set a cookie? I am already using the Session library and database sessions which stores the session_id etc, but I need to to be able to check if the user is a first time visitor and if they have a cookie already ` $cookie = ar...

Better Capture to Session Affiliate Id from GET in PHP

Can someone help me clean this up and make it more logical? I'm fried right now and can't seem to get a good line of code written :) I'm trying to capture affiliate id from urls like ?aid=3056677. The idea is IF aff id is set in GET that takes precedence, the session and finally cookie with least. Also, we don't want to set an aff id th...

Making cookies with php and perl

I am trying to set a cookie using PHP, so it's the same as the one output by the Perl code below: my %auth; $auth{'username'} = $username; $auth{'password'} = $password; my $wholesaleauth = $co->cookie ( -name=>'wholesaleauth', -value=>\%auth, -expires=>'+1h', -path=>'/' ); Now I do not know perl and all and do not want to change ...

Login to site with HttpClient Post

I am trying to make a program that logs into a site and performs some automated activities. I have been using HttpClient 4.0.1, and using this to get started: http://hc.apache.org/httpcomponents-client/primer.html. On this particular site, the cookies are not set through a "set-cookie" header, but in javascript. So far, I am unable to...

Codeigniter Session databse

Hello, I am trying to build a system the remebers the users interactions with website, for example my site allows the users to build there own navigation system, but I want the system to be able to remember the navigations system they choose with out the user having to sign up, I assume I need to user sessions/cookies for these, and fu...

Cookie being destroyed when browser quits

hello, I am currently playing around with cookies in my website, the first thing I do is run a check as to whether the user has cookie, if they dont I display a menu wth 3 options if they click it creates a cookie, but if then quit the browser the cookie is destroyed, here is my code, function createRandomId() { $chars = "abcdefg...

how can i do sessions in java if some one disables cookies in my browser?

Hi, I like to know if someone disables the cookies in my browser then cookies dont work for my browser then how can I do sessions in java. I am writing servlets for server side programming. Then how does my sessions work? How does it recognize the user? As JSESSION ID is stored in cookies... ...

Cookie Expiration times

Is is possible to find out when a cookie expires, I have set my cookie up doing this $_COOKIE[] = setcookie("bangUser", $unique, time() + (60*60*24*30)); is possible to print out is expiration date on screen somehow? ...

How can I do sessions URL is very long I cannot append JSESSIONID=389729387392.What is the solution for this?

Hi I got the answer for If I disabled the cookies then using URL ReDirect I can pass the JSESSIONID but my URL is already very long as I use the GET method it has constraint. Then how should I use my sessions.I want my application to be very security intensive. This is one of the question asked to my friend in GOOGLE interview. ...

What's wrong with this external merb cookie verification snippet?

I'd like to access the cookies from an external app from merb but use the cookies to verify the user who sends the request to the external app. The example code is here: http://pastie.org/778601 This looks fairly straightforward to me so I'm not quite sure why it isn't working. Obviously you'll need to replace the session_secret_key an...

What kind of text is stored with setcookie()?

When you setcookie('id','111'...) does the browser store that cookie with additional information, like where it got from? How would that look like? I assume a website cannot access cookies set by facebook or twitter on somebody's computer. ...

Silverlight not sending cookies in cross-domain browser requests

I have a Silverlight 3 control that makes a cross-domain HTTP request to http:// somedomain/. I am using the browser HTTP stack to make this request. A proper clientaccesspolicy.xml on somedomain is in place. My browser has a set of cookies for somedomain and I want these to by used when said HTTP request is made. When my Silverlight c...

Cookie not saving

On my site the user is greeted with a yes/no menu what determines whether they see it, is this peiece of code. if(!isset($_COOKIE['bangUser'])) { // Get createRandomId() method and return a unique ID for the user $unique = ''; // Setting the cookie, name = bangUser, the cookie will expire after 30 day...

bookmarket and authentication

Development platform: ASP.NET I am trying to code a bookmarklet which would enable user to select any text on any webpage and save it. The bookmarklet will load the selected text and has a save button which would post the text (via ajax) to the server. The issue i am having is how do i authenticate the user. I set an encrypted cookies...

Is the cookie "metadata" (expires, path,...) transferred to the server?

When you set a cookie, you set the raw cookie data, and some metadata. This metadata includes the path for where the cookie is valid, the expiration time of the cookie, and so on. When a browser performs a request, what exactly will the browsers send with it? Will it send the full cookie, with all the "metadata"? Or only the actual data...

How to preserve language status using PHP sessions and cookies

I have this in my index.php: <?php include_once 'file.php' ?> then I have <html> some content </html> and I have this in file.php: <?php session_start(); header('Cache-control: private'); if(isSet($_GET['lang'])) { $lang = $_GET['lang']; $_SESSION['lang'] = $lang; setcookie("lang", $lang, time() + (3600 * 24 * 30)); } else if(isSe...

How many cookies are stored in my browser once I login to my gmail account?

Hi I am learning cookies I read that whenever I login a cookie will be stored on my browser but I have seen there are more than 4 cookies stored in my browser? Can anybody elaborate it how exactly works? Thanks ...

what are persistant cookies? How long do they exist?

I heard cookies are stored in my browser. But what are persistant cookies? Where they are stored? What is the use of those cookies? ...

Yadis authentication without OpenID

I am in need of an authentication system that would work in harmony with the current authentication system my client's server uses. The current system works as follows: A page requiring authentication invokes an in-house developed mod_auth Apache module in the .htaccess file. The user is redirected to a generic log in page. After ente...