Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/wgn/public_html/support/Sources/Load.php(225) : runtime-created function on line 3
Found something else we like for detecting a mobile device for a show if - else
Web Global Net Web Application & Web Development Project Center
March 21, 2025, 09:11: AM *

:
 
      
: [1]   
   |   
: Found something else we like for detecting a mobile device for a show if - else  ( 22155 )
0 2
admin
Administrator
******


: 239



« : January 22, 2017, 09:17: PM »

Download the mobile_detect.php file and place it where you want on your server.

Here's the show if scripting

 <?php include("mobile_script/Mobile_Detect.php");  // Check for any mobile device.
$detect = new Mobile_Detect(); ?>


<?php if ($detect->isMobile()) { ?>

   show if mobile

<?php } else {  ?>

   show if desktop

   <?php } ?>

* Mobile_Detect.php (80.55 - 1345 .)
 

The Unknown Webmaster
: [1]   
   |   
 
:  

Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.