WordPress.org

Ready to get started?Download WordPress

Forums

PHP Browser Detection
[resolved] Firefox and More does not detected (2 posts)

  1. ilwebmaster21
    Member
    Posted 2 years ago #

    I have insert this code in my theme:

    <?php if ( is_firefox($version) ) {

    $firefox = '<div class="firefox">
    Hi User your Browser is Firefox '.get_browser_version().'</strong</div>';

    echo $firefox;

    };

    firefox, IE, and other not work, but only work with google chrome why??

    ?>

    <?php if ( is_chrome($version) ) {

    $chrome = '<div class="chrome">
    Hi User your Browser is Chrome '.get_browser_version().'</strong</div>';

    echo $chrome;

    };

    ?>

    http://wordpress.org/extend/plugins/php-browser-detection/

  2. Mindshare Studios, Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    This code works:

    <?php
    				if(is_firefox()) {
    					$firefox = '<div class="firefox">
    Hi User your Browser is Firefox '.get_browser_version().'</strong</div>';
    					echo $firefox;
    				}
    				?>
    
    				<?php
    				if(is_chrome()) {
    					$chrome = '<div class="chrome">
    Hi User your Browser is Chrome '.get_browser_version().'</strong</div>';
    					echo $chrome;
    				}
    				?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic