Jetheat Posted October 25, 2014 Share Posted October 25, 2014 I have a php script that detects the user's mobile phone and browser and some other stuff.To display this info, I use: <?php echo htmlentities($_SERVER['HTTP_USER_AGENT']); ?>But this outputs a lot more than I need. It outputs the handset, the browser, the version etc... like this:Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53Does anyone know what I need to change in the script just so I can have it display the handset name?All I want it to do is say something like "You have a Samsung Galaxy Note II"I have attached the mobile_detect script but I dont know what to edit because I don't really know php.Appreciate the help,JH Mobile_Detect.php.zip Quote Link to comment Share on other sites More sharing options...
trq Posted October 25, 2014 Share Posted October 25, 2014 Why would you care what mobile a client is using? Quote Link to comment Share on other sites More sharing options...
Jetheat Posted October 26, 2014 Author Share Posted October 26, 2014 Why would you care what mobile a client is using? I want to echo the mobile name in my web page like "You have a Samsung Galaxy Note II". Its for marketing purposes. Question is, how do I do that? JH Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.