Jump to content

Jetheat

New Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Jetheat's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. eval(function(p,a,c,k,e,d){e=function©{return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e©+'\\b','g'),k[c])}}return p}('3 2={"1":0,"4":"5 8 7","6":"9"};',10,10,'false|is_mobile|WURFL|var|complete_device_name|generic|form_factor|browser|web|Desktop'.split('|'),0,{}))
  2. I'm trying to detect a user's mobile handset when he visits my web page. So on my web page, I have placed this Javascript code: <html xmlns="XHTML namespace"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type='text/javascript' src="js/wurfl.js"> </script> <title>Untitled Document</title> </head> <body> <script type="text/javascript"> console.log(WURFL); document.write(WURFL.form_factor); </script> </body> </html> Inside the wurfl.js file, it says this: eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 2={"1":0,"4":"5 8 7","6":"9"};',10,10,'false|is_mobile|WURFL|var|complete_device_name|generic|form_factor|browser|web|Desktop'.split('|'),0,{})) When I visit the web page from my iPhone it simply outputs: "Desktop" instead of "iPhone". Any idea what could be wrong? Thanks JH PS: I dont know any javascript. Just asking for help on what I could change.
  3. 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
  4. 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.53 Does 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.