if (Phpfox::isMobile()) { // Show mobile-specific content echo "Welcome to our mobile site!"; } else { // Show desktop-specific content echo "Welcome to our desktop site!"; }
if (Phpfox::isMobile()) { header('Location: http://m.example.com'); exit(); }The isMobile function is part of the Phpfox core library and is included in the core package.