Jump to content

kimosiris

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by kimosiris

  1. silkfire thanks for the suggestion. I have been busy so I have not yet returned to my project. I will apply the code and let you know if I have errors
  2. ...and here I am foolishly thinking this forum was here to assist 'anyone' needing php help. creata.physics don't you think if I knew 'exactly' the correct thing to do I would have done it? I am merely presenting my concept with the hope that someone 'knowledgeable' will point me in the right direction. If you do not have a solution or method suggestion then there's no need to post in this string!
  3. darkfreaks that additional = didn't make a difference. Note that I do not get any errors with the scripting above, it just does not execute and load the file. If I do it like this below it works fine, which is how I have it now but it has gotten quite long. $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $bb = strpos($_SERVER['HTTP_USER_AGENT'],"blackberry"); $droid = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); if ($iphone == true or $bb == true or $droid == true) { echo 'phone page';} else {echo 'big monitor page'; } @gristoi WURFL does work but as you said it is quite an overkill as it attempts to detect all possible user agents though it does allow for specific isolated queries. Thanks for the suggestions and since I already went through the process of setting up WURFL I will keep it running but I'd still like to find the solution as to why the simple array does not work. If anyone knows please advise.
  4. I have a simple detection for mobile devices and it works fine but it has gotten a bit bloated so I tried to put the list in an array. I don't get errors but it doesn't work. Here is what I tried $useragents = array("iPhone","iPod","incognito","webmate","Android","dream","CUPCAKE","blackberry9500","blackberry9530","blackberry9520","blackberry9550","blackberry 9800","webOS","s8000","bada","Googlebot-Mobile"); if (in_array(1, $useragents)) { $phones = strpos($_SERVER['HTTP_USER_AGENT'], $useragents); } if ($phones == true) { include_once './template/phones.php';} Please assist
×
×
  • 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.