This is a great PHP class [SIZE=14px]for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
Works great. Enjoy[/SIZE]
This is a great PHP class [SIZE=14px]for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
Works great. Enjoy[/SIZE]
Larryh1115
Thanks for sharing.
Larry,
I have been using this since my post in December of last year, see below some code I am using.
Hello All,
Has anybody used the following library with ScriptCase?
http://mobiledetect.net/
[SIZE=14px]Mobile Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.[/SIZE]
[SIZE=14px]You may consider this script as being part of the RESS (Responsive Web Design with Server-Side Component) movement. You can find out more on the topic by reading these articles: Improve Mobile Support With Server-Side-Enhanced Responsive Designand RESS: Responsive Design + Server Side Components.
Here is some Sample Code:[/SIZE]
How do you use that with SC? Just add to external library and put the code where? In the login app?
NO.
Create external library and then create blank app for example - mobile_detect
Insert the code as follows:
// *** Load Library Mobile Detect ***
?>
<script src="<?php echo sc_url_library(‘grp’, ‘mobile_detect’, ‘/Mobile-Detect-2.8.33/Mobile_Detect.php’); ?>"></script>
<?php
$detect = new Mobile_Detect;
if ( $detect->isMobile() )
{
sc_redir(mobile); // *** Redir to mobile menu ***
}
else
{
sc_redir(login); /// *** Redir to desktop menu ***
}
And set the mobile_detect app as yours - initial application
Wow. That looks easy. I’ll try it. Thank you.
Sorry, my mistake. I was too fast.
For the description above, I’m using a different mobile detect library.
You get it at this link:
[URL=“http://mobiledetect.net”]http://mobiledetect.net
Edit:
Ohh, it’s the same.
Obviously I only have a newer version.
Thank you Rik. Sounds like just what I need.