Page is a not externally linkable
- Browsers
-- Opera Browser Usage and Support
---- opera - browser sniffing - replace content - help needed


David - 9:40 pm on Apr 19, 2002 (gmt 0)


I am not sure I understand what you are working with.

If this is a parsed php page

<? //Start php mode
if (eregi("opera",$HTTP_USER_AGENT)){
$BROWSER_NAME="OPERA";
}
if ($BROWSER_NAME == "OPERA"){
?> //escape php for html
<td> Your Opera Menu </td>
<? //finish the if statement
}
?>

What this does is searches the nix server variable for the user agent and if Opera is in that string it assigns OPERA to $BROWSER_NAME

Then you would check $BROWSER_NAME for Opera and if its true insert your menu. If you are on a windows box then maybe the server variable is different.


Thread source:: http://www.webmasterworld.com/opera_browser/297.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com