cookies

Processing a website by using POST data and cookies

I try to access an ASPX-website where subsequent pages are returned based on post data. Unfortunately all my attempts to get the following pages fail. Hopefully, someone here has an idea where to find the error! In step one I read the session ID from the cookie as well as the value of the viewstate variable in the returned html page. St...

C# Get Cookies from server response provided on data POST

Hi! I can't get my head around this (login) problem: 1) I post some data 2) Server reacts and generate response with some cookies in headers (Set-Cookie) 3) I want to store that cookies so I can later use them to generate more requests My C# code looks like this: byte[] buffer = Encoding.ASCII.GetBytes(data_to_post); HttpWebRequest W...

Alert once (jQuery)

Is it possible to alert a user just once about something on his first visit? Can't use cookies because its a static site, only html and javascript are used. Thanks! ...

JSONP and sharing cookies from one server to another?

I'm working on an intranet system (.NET 3.5); the main pages are served up from a standard ASP.NET server. I would like to use Ajax on those pages to contact a WCF service running on a different machine, to retrieve data, do CRUD operations - the usual Ajax stuff. The problem I'm trying to resolve is: can I take cookies which were set ...

What's the best method to protect login cookie data in PHP?

I'm creating a login system in PHP, and I want to know how to best protect the user information string in my cookie. I was thinking of encrypting the string with a key somehow? Is this the best way? I'm kinda new to this. Thanks in advance. ...

Limit posting to every 30 minutes

Hey. Thanks for looking. I'm trying to write a script to set a cookie after the user posts a comment, limiting them from posting again for 30 minutes. I'm so confused on where to start. Please, could you guys help me out on how I do this? I'm trying to use this jquery plugin – countdown timer. ...

Can subdomain.example.com set a cookie that can be read by example.com?

I simply cannot believe this is quite so hard to determine. Even having read the RFCs, it's not clear to me if a server at subdomain.example.com can set a cookie that can be read by example.com. subdomain.example.com can set a cookie whose Domain attribute is .example.com. RFC 2965 seems to explicitly state that such a cookie will not...

Unable to read cookie across subdomains (owa_cookie)

Hi folks, In my production environment, my front end is on a.example.com and my back end is on b.example.com: I'm creating a cookie in .example.com domain in path '/' using javascript for it to be read from any subdomain. When I try to read the cookie from b.example.com domain from Oracle using owa_cookie it gives the error no_data_fo...

What is the correct value for SESSION_COOKIE_DOMAIN if my Django site is set up on a subdomain?

Hi, I have constant problem with cookies on my Django site which is set up on a subdomain. It works for a couple of days, then message 'your browser doesn't accept cookies' appears on a login page. I need to restart my web server to make it work for a couple of next days and this cycle repeats. This is really frustrating. I am not sure...

Authentication/Session cookie deleting after browser close

What are the exact steps required for a cookie to persist after a browser is closed? At the moment I have: createPersistentCookie set to true on LoggedIn event. MachineKey specified. Forms sliding expiration set to true. As long as the browser is open, the user will stay logged in, but as soon as it's closed, and it doesn't matter f...

Remove cookie from XMLHttpRequest object

I am making an ajax call with jquery like: $.ajax({ url: "path/to/webservice.asmx" beforeSend: function(xmlHTTPRequest) { //modify headers here //remove cookies } success: function() { //do stuff } } What I would like to do in the beforeSend function is take the incoming xmlHTTPRequest varia...

Get Cookies PHP

Hi, I'm setting a cookie on an anchor click on my page: $("#btn_twitter_signin").click(function() { $.cookie("bookmarklet_twitter_signin", "true"); }); and on the server side i'm trying to retrieve it $_COOKIE['bookmarklet_twitter_signin'] but strangely i'm getting an "Undefined index: bookmarklet_twitter_signin", though i mad...

PHP setcookie to resemble ASP.Net Cookie subkeys

ASP.Net has the concept of using 'subkeys' in cookies. i.e. You can write a cookie with Response.Cookies("userInfo")("userName") = "patrick" Response.Cookies("userInfo")("lastVisit") = "today" This would create a cookie which looks like Name: userInfo Value: userName=patrick:lastVisit=today Is there a native method in PHP to re...

CSRF vulnerability / cookies question

Just want to get input from people who know. I was considering CSRF vulnerabilities, and the seemingly the most popular method I know to fight against it. That method is to create a token in the returned html and adding a cookie with the same value. So if a script tries to do a post they would have to guess the token thats embedded in th...

PHP cURL isn't storing the session cookie... How to fix this?

Hi all, I am making a class to comunicate with our company API... I'm using curl to post data and retrieve the response in json. In the last part of the code (after the class), i log the user into the server (it gives true), but when i try to connect again with curl, he says that i'm not logged! I've done a google search already and adde...

How can I tell if cookies are being set on my domain?

I've been doing a lot of reading on how to optimize website performance. Both Google and Yahoo advocate using cookie-less domains; I've also read about setting up subdomains to achieve the same effect. My question is: is there a way to determine if cookies are being set at the *.example.com level versus the www.example.com level? I have...

Android app remain logged into website, cookies? Session?

I'm looking to make an android app that is basically a custom view of a text based gaming website. I know how to do HttpPosting and such, so sending login information is relatively simple. But my question is, how would I go about then navigating the site? I've never really worked with sessions and cookies on the client side. Is a cookie ...

Setting cookie expiration with ASP classic to ASP.NET session sharing solution

I'm implementing the session sharing structure from this link for an ASP classic site to begin the gradual conversion process to ASP.NET. I'm trying to extend the cookie expiration time so that users do not get signed out of the site when the session expires. At the place where the cookie is created in SessionPage.cs I've added the line ...

json_decode in PHP to set a cookie..

Hi All, I want to decode Json returned from the WebService, And it should set a cookie, that i want to use to call next WebService API. I am not sure how to set a cookie, and decode this json. I tried decoding it, but get the error. I need to extract sessionId. You can use the WebService.. I have put this on Internet. Here is my code s...

How to handle "Remember me" in the Asp.Net Membership Provider

Ive written a custom membership provider for my ASP.Net website. Im using the default Forms.Authentication redirect where you simply pass true to the method to tell it to "Remember me" for the current user. I presume that this function simply writes a cookie to the local machine containing some login credential of the user. What does...