$_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 :
$ua=$_SERVER['HTTP_USER_AGENT'];
if (preg_match('/android|mobile|tablet|ip(od|hone)/i',$ua)) { echo 'Mobile'; }
else { echo 'Desktop'; }
Result : Desktop