cookies in PHP

This is a discussion on "cookies in PHP" within the PHP Forum section. This forum, and the thread "cookies in PHP are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 17th, 2007, 10:02
Banned Member
Join Date: Apr 2007
Location: us
Age: 38
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cookies in PHP

As I am working on this http://www.deonlinecasino.com. I want to maintain cookies on my site. I know that cookies are created as temporary cookies which are store in the browsers memory. When browser is closed, these temporary cookies will be erased. Can anybody help me to know more about cookies in PHP and how to maintain cookies?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 17th, 2007, 10:39
New Member
Join Date: May 2007
Location: Sendai, Japan
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cookies in PHP

http://bonrouge.com/br.php?page=faq#setcookie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 17th, 2007, 16:16
New Member
Join Date: Jul 2005
Location: UK (Scotland)
Age: 29
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cookies in PHP

Cookies do not actually get stored in browser memory.

They get stored in text files on the client pc. For example internet explorer stores my cookies in C:\Documents and Settings\Peter\Cookies and firefox stores them in C:\Documents and Settings\Peter\Application Data\Mozilla\Firefox\Profiles\agzxkulx.default (although they can be accessed through clicking tools/options/privavcy/show cookies.

When the disappear depends on a couple of things.

Firstly when a website sets a cookie it will usually set a time in seconds on when the cookie should expire. If the time is in the past then the cookie will be destroyed when the browser is closed (as it does when no time is set) in php the time used is from the unix epoch.

Another thing that can affect the life of a cookie is the users settings, for example they could have their browser set to delete cookies when the browser is closed (and this will happen regardless of when the expire date is set).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 31st, 2007, 08:59
New Member
Join Date: May 2007
Location: tehran
Age: 26
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cookies in PHP

you should just set the the time u want the cookie be available when you are creating it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 31st, 2007, 17:17
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: cookies in PHP

Quote:
Originally Posted by filth View Post
Cookies do not actually get stored in browser memory.

They get stored in text files on the client pc. For example ....
My understanding was that cookies sent WITHOUT an expiry time were saved within the browser process, but that those sent down WITH an expiry time are stored in test files on the PC, as you suggest.

Are you telling us that Internet Explorer actually stores all cookies (even the non-persistant) ones to file, then takes them out of that file when the user closes the browser? It's up to Microsoft how they implement the standard, of course, but that seems an odd way to do it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cookies... please help!!!! earl080688 PHP Forum 4 Jan 14th, 2008 05:51
how to store cookies selphie08 Flash & Multimedia Forum 3 Sep 20th, 2006 01:54
ASP Cookies señorbadger Classic ASP 6 Nov 22nd, 2003 14:04
Flash+cookies icthecat Flash & Multimedia Forum 1 Oct 31st, 2003 06:32


All times are GMT. The time now is 10:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42