Reply to Re: Q: Browser ID assumption - Not able to differentiate multiple users on 1 PC

Your name:

Reply:


Posted by Mladen Gogala on 10/11/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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация