I'm sorry, color me newby in PHP, but I'm confused about the 2nd line in the above code:
require_once("mdetect.php");
What does the "mdetect.php" refer to? Or is it the way by which the above code should be named as a file? Again, sorry for what surely will seem like a stupid question. Thanks in advance for your reply.
I'm sorry, color me newby in PHP, but I'm confused about the 2nd line in the above code:
require_once("mdetect.php");
What does the "mdetect.php" refer to? Or is it the way by which the above code should be named as a file? Again, sorry for what surely will seem like a stupid question. Thanks in advance for your reply.
mdetect is a library that detects whether the user if is a smartphone. the functions require() and require_once() load php scripts/libraries.
why not simply use header() ?
requireonce("mdetect.php"); header("Location: " . ((uagentinfo::DetectSmartphone() )?"http://m.google.com":"http://www.google.com"));