/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php require_once("mdetect.php"); $uagent_obj = new uagent_info(); $is_mobile = $uagent_obj->DetectSmartphone(); if ($is_mobile) echo "<meta http-equiv=\"refresh\" content=\"0;URL=http://m.google.com\">"; else echo "<meta http-equiv=\"refresh\" content=\"0;URL=http://google.com\">"; ?>