|
Posted by Mladen Gogala on 10/09/71 11:36
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
Navigation:
[Reply to this message]
|