environment differences
Posted: Tue Mar 02, 2010 10:41 am
Hi, can anyone help me with this codes? I would like to print different text from different web browser using ereg() or preg_match() function.
I have tried like this but doesnt work:
<?php
$moz = $_SERVER['HTTP_USER_AGENT'];
if(ereg("mozila firefox",$moz))
{
echo "this is mozila";
}
else
{
echo " this is MSIE";
}
?>
I have tried like this but doesnt work:
<?php
$moz = $_SERVER['HTTP_USER_AGENT'];
if(ereg("mozila firefox",$moz))
{
echo "this is mozila";
}
else
{
echo " this is MSIE";
}
?>