PHP redirect without javascript


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. require_once("mdetect.php");
  3. $uagent_obj = new uagent_info();
  4. $is_mobile = $uagent_obj->DetectSmartphone();
  5. if ($is_mobile)
  6. echo "<meta http-equiv=\"refresh\" content=\"0;URL=http://m.google.com\">";
  7. else
  8. echo "<meta http-equiv=\"refresh\" content=\"0;URL=http://google.com\">";
  9. ?>

URL: http://simplistika.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.