Friday, June 1, 2012

Check user browser to switch css

Use global variable: HTTP_USER_AGENT

<?php if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'android')) : ?>
    <!-- your specific css here -->
<?php endif; ?>
Subscribe to RSS Feed Follow me on Twitter!