: can anyone help my with this syntax? : : i'm trying to add a browser sniffer snippet (this isn't the real code) : to my leech script (yes, the one that i have already posted a few times : about)... that will do A if MSIE on windows, or B if anything else...
This works for me: if( ereg( "linux", $HTTP_USER_AGENT ) ) print "<font size=1 color=\"#cccccc\">Linux users rule!</font><br>\n"; Or you could reverse it: if( !ereg( "linux", $HTTP_USER_AGENT ) ) print "<font size=1 color=\"#cccccc\">You should be using Linux!</font><br>\n"; But either of these could have an and put in very easily.. if( ereg( "linux", $HTTP_USER_AGENT ) AND ereg( "mozilla", $HTTP_USER_AGENT ) ) print "<font size=1 color=\"#cccccc\">Linux users rule! But Mozilla is a hog!</font><br>\n"; Hope this helps.. Bob ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
