Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old May 17th, 2007, 06:02 AM   #1
New Member
 

Join Date: Apr 2007
Location: us
Age: 40
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 marquey is on a distinguished road
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?
marquey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 17th, 2007, 06:39 AM   #2
New Member
 

Join Date: May 2007
Location: Sendai, Japan
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 BonRouge is on a distinguished road
Re: cookies in PHP

http://bonrouge.com/br.php?page=faq#setcookie
BonRouge is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 17th, 2007, 12:16 PM   #3
New Member
 

Join Date: Jul 2005
Location: UK (Scotland)
Age: 31
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 filth is on a distinguished road
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).
filth is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 31st, 2007, 04:59 AM   #4
New Member
 

Join Date: May 2007
Location: tehran
Age: 28
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 amir1981 is on a distinguished road
Re: cookies in PHP

you should just set the the time u want the cookie be available when you are creating it
amir1981 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 31st, 2007, 01:17 PM   #5
Reputable Member
 

Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 grahame is a jewel in the rough grahame is a jewel in the rough grahame is a jewel in the rough
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.
grahame is offline  
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

Bookmarks

Tags
php


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 4 January 14th, 2008 01:51 AM
how to store cookies selphie08 Flash and ActionScript 3 September 19th, 2006 09:54 PM
ASP Cookies señorbadger Classic ASP 6 November 22nd, 2003 10:04 AM
Flash+cookies icthecat Flash and ActionScript 1 October 31st, 2003 02:32 AM


Search Engine Optimization by vBSEO 3.2.0 RC8