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.
|
|
|
|
|
![]() |
||
cookies in PHP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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? |
|
|
|
#2
|
|||
|
|||
|
Re: cookies in PHP
|
|
#3
|
|||
|
|||
|
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). |
|
#4
|
|||
|
|||
|
Re: cookies in PHP
you should just set the the time u want the cookie be available when you are creating it
|
|
#5
|
|||
|
|||
|
Re: cookies in PHP
Quote:
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. |
![]() |
| Tags |
| php |
| Thread Tools | |
|
|
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 |