cookies

Allowed characters in cookies

Hey everyone, this one's a quickie: What are the the allowed characters in both cookie name and value? Are they same as URL or some common subset? Reason I'm asking is that I've recently hit some strange behavior with cookies that have - in their name and I'm just wondering if it's something browser specific or if my code is faulty. ...

how to request to a remote server with cookies included (PHP/javascript)

hi I want to send a request including cookies to a HTTP website. How I can do this? I sent a request without cookies as a first-time visit and tracked the header there was a cookie inside responded header like this: Set-cookie: ERIGHTS=VQPFIWEdiYEtW4Eko2T3bikz4H2dDx2FtH-zlTTRFyzW+urkCU7bwGj2w== Set-cookie: WLSESSION=1512202892.20480....

Managing cookies in a WPF WebBrowser control?

Is there a way to read/write the cookies that a WebBrowser control uses? I am doing something like this... string resultHtml; HttpWebRequest request = CreateMyHttpWebRequest(); // fills http headers and stuff HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (StreamReader sr = new StreamReader(response.GetRes...

php cookie behaviour changes in recent versions

I have a website written in-house, using a 3rd party login mechanism. Recently we've been required to maintain PCI compliance, and I made a lot of changes in the environment. Shortly after we noticed a problem with cookies. I've rolled back all of the changes except the more difficult one of moving from php 5.3 back to 5.2.11, or what...

ASP.NET Cookies

Guys, I am trying to make a website that keeps a cookie active, so long as the user is active in the site. My idea was to create a cookie on the main page of the site, like so: HttpCookie cookie = new HttpCookie("KeepAlive","1"); cookie.Expires = DateTime.Now.AddMinutes(20); Request.Cookies.Add(cookie); If I have this code in my Page_...

Storing real time data

Hello, I am building a website in which the user can select what list items they see in their navigation menu, my idea is to store the menu items that the user selects in a cookie as this will stop the need for the user to be registered member on the website, is it possible to store realtime data in a cookie and how would I do this? ...

jQuery Toggle Cookie Support

I'm trying to implement the jQuery Cookie plugin into my slide toggle script, but so far haven't been successful. Here's my code (without any cookie implementation): jQuery: $(document).ready(function() { $('a.toggle').click(function() { var id = $(this).attr('name'); $('#module' + id).slideToggle('fast'); $('a.toggle[name=...

How to tell browser do not send COOKIE for certain folders, files or request?

I'm running PHP5 and Apache with mod_rewrite enabled. As we know on every page load browser sends cookie data to requested files. This data could be useful for PHP files, however for images or css files it has no value and simply make communication between browser and server slower. Is there any ways to tell browser or server to stop d...

Setting cookie by calling webpage by Microsoft.XMLHTTP

Hi, The situation: I have 2 webpages with 2 domains (backoffice.myurl.com & www.myurl.com). The backoffice is written in classic asp, the frontend in asp.net 3.5 (vb.net) When I hit a button in the backoffice, I want to set a cookie on the frontend. I do this by calling a page on the frontend via Microsoft.XMLHTTP Dim GetConnection S...

Is there another way in java 1.1 to handle cookies in Applets other than JSObject

Hi experts,,, wish you all a happy and exciting year of 2010. Is there another way in java 1.1 to handle cookies in Applets other than using JSObject... ...

Update cookies for Facebook connect based site?

I'm using the Facebook Connect API for the login system on a website built using PHP. There is no straightforward way to determine if a user is logged in. $fb = new Facebook($api, $secret); $fb->get_loggedin_user(); The above function always returns a user id, once a user has authenticated with the site, even if they sign out of Fac...

Implementing jQuery Cookie Plugin

How would I implement the jQuery Cookie Plugin into this snippet of jQuery, so it saves the open/closed state of the toggles upon leaving the page? $(document).ready(function() { $('a.toggle').click(function() { var id = $(this).attr('name'); $('#module' + id).slideToggle('fast'); $('a.toggle[name='+id+']').toggle(); retu...

Secure Member Login Using Cookies

Hello, Is storing username & password of the user in a cookie a good practice? I really want to know how big websites like (Facebook, digg, twitter) handle this. My code is like that: <?php $username = mysql_real_escape_string($_POST['username']); $password = md5($_POST['password']); ?> After every successful login i store the $use...

How do I keep a user logged in to an application on Android?

When a user logs in to my online android application, I want to store a cookie on the user's phone so that he doesn't have to log in to the application on subsequent visits from the same phone. How do I do this on android? ...

ASP .NET create other Session when switch to http://example.com or http://www.example.com

If I type http://example.com and login to my site and close my browser, re-open it and retype http://example.com then I am logged in. However, when I type http://example.com, login, close the browser, re-open it, type http://www.example.com then I am NOT logged in. I do not use ASP .NET authentication classes. I run IIS 6 with both ex...

vb.net problems posting to web form

I've hit a wall on POST'ing data to a webform :( Below is the code I've adapted from many places (here most recently: http://p2p.wrox.com/asp-net-1-0-1-1-professional/34517-webrequest-webresponse-form-submit-problem-help.html ) Dim url As String = "https://student.ashford.edu/student/" Dim data As String = "username=myusername&...

Should using cookies be avoided if it's possible?

Is it slower to retrieve a user's cookie and get its value as a PHP variable, than it is to retrieve a session variable? ...

After I authenticate a user in API how should I make sure they don't have access for too long

I am working on builing an API and application section on a social network so it will be something like myspace, facebook, hi5, friendster, netlog, and many other's have application section, they all use a REST server method and most of them will issue a api key and secret to each application developed. The person who builds the app wil...

PHP Language System with no user registration

i want to make my site available in several languages, but im not going to use user registration so how can i make a language system? searched for a cookie language system tutorial but didnt found anything if you have any other suggestion please share, and i cant use modrewrite ...

Setting a cookie for cURL to use.

I am retrieving another page using cURL, and unless I have a certain cookie I cannot see the page content. The cookie name is seepage and its value must be set to 1 for me to see the page content. I would like to load this page using cURL, and this is the script I have at the moment: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_...