I need a way in php
to be able to know when my website is being opened on mobile/tablet. I need specific design for each device (iPhone, android and tablet’s)
I’ve tried this but its not working properly:
<?php if(stristr($_SERVER['HTTP_USER_AGENT'], "Mobile"))
{ // if mobile browser ?>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/mobile.css" type="text/css" media="screen" />
<?php }
Can anyone help me?