This is a discussion on Q: Browser ID assumption - Not able to differentiate multiple users on 1 PC within the PHP Language forums, part of the PHP Programming Forums category; I have no intention of using any such mechanism to distinguish users of my PHP applications, but I was wondering (...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have no intention of using any such mechanism to distinguish users of
my PHP applications, but I was wondering (and it isn't easy for me to test) ... ....On a single PC with a single browser where multiple users log-in to it eg on a PC called FOO there might be users MARY and JOHN is it the general practice for browsers to have separate cookie/cache/password files so that if JOHN looks at my web page and I previously sent him a "you are John" cookie he'll be identified by it and not by the "you are Mary" cookie that Mary obtained between times. -- PETER FOX Not the same since the submarine business went under peterfox@eminent.demon.co.uk.not.this.bit.no.html 2 Tees Close, Witham, Essex. Gravity beer in Essex <http://www.eminent.demon.co.uk> |
|
|||
|
Peter Fox wrote:
> ...On a single PC with a single browser where multiple users log-in to > it eg on a PC called FOO there might be users MARY and JOHN is it the > general practice for browsers to have separate cookie/cache/password > files so that if JOHN looks at my web page and I previously sent him a > "you are John" cookie he'll be identified by it and not by the "you are > Mary" cookie that Mary obtained between times. IME, yes, the cookies will be specific to the different accounts on the computer. This is especially true with *nix, mac osx, win xp/2000/nt. The ones that I am unsure of are Mac OS <= 9.2, win <= 98/me, and any other operating system not mentioned above. HTH -- Justin Koivisto, ZCE - justin@koivi.com http://koivi.com |
|
|||
|
On Thu, 05 Jan 2006 09:18:50 +0000, Peter Fox wrote:
> I have no intention of using any such mechanism to distinguish users of > my PHP applications, but I was wondering (and it isn't easy for me to > test) ... > > ...On a single PC with a single browser where multiple users log-in to > it eg on a PC called FOO there might be users MARY and JOHN is it the > general practice for browsers to have separate cookie/cache/password > files so that if JOHN looks at my web page and I previously sent him a > "you are John" cookie he'll be identified by it and not by the "you are > Mary" cookie that Mary obtained between times. You probably want something like this: <?php $agent = $_SERVER['HTTP_USER_AGENT']; if (preg_match('/firefox/i', $agent)) echo "Congratulations! You are using the One True Browser!<br>"; else die("Apage, Satanas! I don't serve those who don't use Firefox!<br>"); ?> -- http://www.mgogala.com |
|
|||
|
Mladen Gogala <gogala@sbcglobal.net> wrote:
> >On Thu, 05 Jan 2006 09:18:50 +0000, Peter Fox wrote: > >> I have no intention of using any such mechanism to distinguish users of >> my PHP applications, but I was wondering (and it isn't easy for me to >> test) ... >> >> ...On a single PC with a single browser where multiple users log-in to >> it eg on a PC called FOO there might be users MARY and JOHN is it the >> general practice for browsers to have separate cookie/cache/password >> files so that if JOHN looks at my web page and I previously sent him a >> "you are John" cookie he'll be identified by it and not by the "you are >> Mary" cookie that Mary obtained between times. > >You probably want something like this: You probably want to READ the posts before replying. -- - Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc. |