Jump to content
php.lv forumi

vajag pavisam iisu skriptu


Recommended Posts

$usr=$_SERVER['HTTP_USER_AGENT'];
$firefoxam = 'firefox.png';
$operai =  'opera.png';
if(eregi("Firefox", $usr)){ echo '<img src="'.$firefoxam.'" alt="firefox"/> }
else if(eregi("Opere", $usr)){ echo '<img src="'.$operai.'" alt="opera"/> }
...

Link to comment
Share on other sites

$usr=$_SERVER['HTTP_USER_AGENT'];
$firefoxam = 'firefox.png';
$ie =  'ie.png';
$cits = 'cits.png';
if(eregi("Firefox", $usr)){ echo '<img src="'.$firefoxam.'" alt="firefox"/>' }
else if(eregi("IE", $usr)){ echo '<img src="'.$ie.'" alt="ie"/>' }
else { echo '<img src="'.$cits.'" alt="cits"/>'; }

Link to comment
Share on other sites

×
×
  • Create New...