Browser Check - User Agent Information

Detection done by PHP:

$_SERVER['HTTP_USER_AGENT']
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Simple mobile/desktop detection example:

  1. <?php

  2. $get_user_agent = $_SERVER['HTTP_USER_AGENT'];

  3. if (preg_match('/android|mobile|tablet|ip(od|hone)/i', $get_user_agent)) { echo 'Mobile'; } else { echo 'Desktop'; }

  4. ?>

Result: Desktop

 

Detection done by Javascript—if enabled: