Forum Moderators: open

Message Too Old, No Replies

php browser sniffing

need to add more agents...

         

iggy99

12:16 am on Apr 20, 2002 (gmt 0)

10+ Year Member



how could we include more than one agent in this example

for instance, mozilla and Opera

many thanks

in addition to <HTTP_USER_AGENT,'Mozilla/5'> we would like to add "Opera"

how would i do this??

many thnaks

<?php
if (!(strpos($HTTP_USER_AGENT,'Mozilla/5') === false)) {
echo("<!-- Netscape 6 specific code -->");
} else {
echo("<!-- Code for other browsers -->");
}
?><?php
if (!(strpos($HTTP_USER_AGENT,'Mozilla/5') === false)) {
echo("<!-- Netscape 6 specific code -->");
} else {
echo("<!-- Code for other browsers -->");
}
?>

David

12:40 am on Apr 20, 2002 (gmt 0)

10+ Year Member



You might give this link a go ..

[google.com...]