Some application, not written by me, and not in PHP, creates a cookie for the domain "www.domain.com".
I am trying to replace that cookie. So in php I did:
setcookie('mycookie','mydata',time() + 2*7*24*60*60,'/','www.domain.com', false);
However the resulting cookie is created for domain: ".www.domain.com", note the dot "." ahead of ...
I'm trying to write a Java program that can automatically log into Facebook.
I've got the below code so far that downloads the home html page into a String but don't know how to send the email and password to log into Facebook? Also will the Java program need to handle cookies returned to remain logged in?
public static void main(Strin...
How do I send the "Set-Cookie" header when working with a BaseHTTPServerRequestHandler, and Cookie? BaseCookie and children don't provide a method to output the value to be passed into send_header(), and *Cookie.output() does not provide a HTTP line delimiter.
Which Cookie class should I be using? Two have survived into Python3, what ar...
I'm wondering if using the following Javascript code is reliable:
if (!document.cookie) {
alert('Cookies are disabled.');
}
I've tested this in IE, Firefox and Chrome and it seems that when you disabled cookies, the document.cookie object becomes unavailable. Does anyone have any experience with this method working/not working?
M...
Can I call the server to set a new cookie with an AJAX request (that is, after the page has already loaded)?
For example, when a visitor hits a link, ajax would open a php file that sets a new cookie like this:
setcookie('cookiename', 'true', time()+3000, "/",'...');
But this is done after the html (the page containing the actual <a>...
I have a site that uses www.example.com for standard pages and secure.example.com for HTTPS.
I am trying to set a cookie when user logs in that will be valid on both the HTTP & HTTPS versions of the site.
I am doing this by setting path to "/" and domain to ".example.com". This works fine in Firefox and Internet Explorer, but in Chrome ...
I want to redirect to a splash page for first time visitors to the site using cookies to remember that they came. This is easy, however, for people with cookies disabled, I never want to redirect them to the splash page.
The problem I'm running into is that when I set the cookie, PHP won't see it until I reload the page. This means fi...
How would I display the current amount of time left of the cookie/session for a logged in user of WordPress? So for example if the cookie timeout is 24 hours and the user has been logged in for 2 hours then the output would be 22 hours.
...
I have a Perl-based website that attempts to set a number of cookies on the users first visit and I just noticed that Safari has stopped setting all but the first cookie that is passed. On first visit two cookies should be set which are 'location' and 'referrer'. In IE and Firefox the cookies are being set correctly but Safari is only se...
I have 2 subdomains and I need to set and read the same cookie from both websites.
When I use localhost, everything works fine.
When I switch to using valid urls, the cookie infomation is not really being updated when I update it (expire date on logout).
I have the domain of the cookie set to ".mysite.com"
what is wrong?
...
In light of the cookie-handling bugs affecting Safari and Chrome (see this thread), and Pylons implementation of redirect_to as an exception, is it possible to reliably set a tracking cookie and redirect at the same time? Is the META refresh method looked down upon?
...
I am migrating our hosting environment to a totally new data center with new boxes and hardware and software... the whole deal.
Our website cookies are encrypted using the machineKey, so when I make a request to my domain and point it to the new web server (by overriding the local hosts file), I get an error because the cookie cannot be...
I wish to "retrieve" the cookies sent by the client in my subclass of BaseHTTPRequestHandler.
Firstly I'm unsure of the exact sequence of sending of headers, in a typical HTTP request and response this is my understanding of the sequence of events:
Client sends request (method, path, HTTP version, host, and ALL headers).
The server re...
[Disclaimer: I know, if you know anything about crypto you're probably about to tell me why I'm doing it wrong - I've done enough Googling to know this seems to be the typical response.]
Suppose the following: you have a central authority that wants to issue login cookies for a given domain. On this domain, you don't necessarily trust ...
Hello,
I have a login script for a small application that works by storing session cookies and checking them on each page to make sure the user is logged in.
One of the two users who uses the system keeps getting logged out randomly.
This appears to be down to the session cookie that shows then authenticated no longer being present.
Aft...
Having the same problem as the poster of this question:
http://stackoverflow.com/questions/1738227/httplib2-how-to-set-more-than-one-cookie
The cookie looks like this..
PHPSESSID=8527b5532b6018aec4159d81f69765bd; path=/; expires=Fri, 19-Feb-2010 13:52:51 GMT, id=1578; expires=Mon, 22-Feb-2010 13:37:51 GMT, password=123456; expires=M...
I have a jquery toggle that swap between two layouts. I need to set a cookie so it dosen't reset every time the browser is refreshed. How can I implent this in this script:
<script type="text/javascript">
$(document).ready(function(){
$("a.switch_thumb").toggle(function(){
$(this).addClass("swap");
$("ul.display").fadeOut("fast...
Hello,
I want to delete all cookies for the user under my domain name. I know logout() method removes the session,but it seems like some of my apps are generating afew more cookies that needs to be cleansed. How can I achieve this? ![alt text][1]
...
I'm creating a live mockup for a client website, and I'm having some problems getting the design to work.
The site master has a menu that has multiple categories, but they all contain similar content. I need the menu to remember which one was selected. So I tried setting a cookie that would remember which category was last accessed, and...
Hello guys,
I'm trying to set up a cookie which would store the time when the user leaves a website, so in the next visit he can find a "There's new content" message (if any) - checked against his "last seen" stored time.
The things I'm stuck with are two : how do I send a cookie when he leaves the site ? And, then, how do I check that...