|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cookies!!! yum yum
Hi All,
A Quick Cookie question... Im setting a login cookie to last 30 min from when the user last loads a page. in other words i re-set the cookie-time every time a new page is loaded.... now ive noticed that the cookie creates more than one copy of itself whenever a page is loaded from a different directory. So in the end i get an instance of the cookie for every directory in my code... the problem lies when a user hasn't accessed the original directory for more than 30 min but has been working in a different directory, the get a timed out error. can Cookies be set to be specific to the entire site instead of being directory specific? gianni ![]() |
|
#2
|
|||
|
|||
|
ahhh, crap, its been ages since ive used cookies, hmm, ive got a feeling that it is possible to do what your saying, i just cant remember how, i think when you create the cookie, their is some var that you set that keeps it for the dir and the dirs above that.
still ive been no help, maybe someone else has an idea of how to do this?? soz |
|
#3
|
|||
|
|||
|
set the cookie directory to /
setcookie('blah', 'moo', $time, '/', '.domain.com'); |
|
#4
|
|||
|
|||
|
ahh thats it!, hehe, its been soo long since ive used cookies, mainly due to the fact that most people (who have trouble starting the computer) have cookies turned off!, so i rely on databases, ips and the like, to replace cookies.
|
|
#5
|
|||
|
|||
|
IE Even blocks them for ya.. so cookie does great job in doing nothing.. it's good especially for vote program to chk if user has voted or not.. cuz ie blocks them and it just won't work..damn cookies.
oh one more thing about cookies using ie u can look at other ppls cookies.. there is tough unbreakable security for ya.
__________________
Regards, James Yang .NET Developer / Network Engineer MCSE, MCDBA, MCSA, CCNA http://www.yellowpin.com/ http://www.opentechsupport.com/ |
|
#6
|
|||
|
|||
|
what? i'm using ie and it does not block cookies.
|
|
#7
|
|||
|
|||
|
the default setting for IE blocks most cookies, if you set your cookies acording the IE rules or you change your settings, you will then exept cookies, also if you upgrade IE over the top of your current installation you settings will be kept, i allow all cookies, since they help store data, i rather not have to remember.
check your IE cookie settings, the security is probally turned off! |
|
#8
|
|||
|
|||
|
sorry i was just paying out cookies ...(how sad do i sound here)
to clarify..since the release of IE6, MS decided taht cookie is not the way to go.. so they have restricted sites using cookies tightly.. many cookies are blocked cuz of this... |
|
#9
|
|||
|
|||
|
stupid microsoft.
so what is their 'great' new method? |
|
#10
|
|||
|
|||
|
Quote:
Ben if you do not use cookies to remember who the person is when they come back...I beleive you are doing something like this? 1. Get their IP address.. 2. Store their IP address in a database. 3. When person comes back check to see if their IP address is in the database if it is then they are that person? 4. If that is the case how do you deal with dynamic IP addresses? Sorry I am trying to get a cookie or something along that line to remember who the person is when they come back. Can someone give me not a little nudge!!! (LOL) but a BIG PUSH with some coding of what they are doing?
__________________
Thanks, Attila http://www.glorynaspiration.com http://www.abitofthings.com |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Cookies!!! yum yum |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|