Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

User Agent detection

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,699 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

In my next version of my website I'd like to have my site detect the user agent of the browser and determine how to display the page. This (as a function of coding) isn't a problem for me to do, but my question is a little different. Does the browser on the Droid phones have a specific User Agent that is not something a PC browser uses?

As an example of my meaning, my next phone will be a Droid and I want to be able to connect to my website with it as needed, but I want it to display differently than if I went there from a PC.

Also (I'll eventually get to it) can a website write a cookie to a cellphone? It would be easier to look for cookie first (although using session might be safer) to see what kind of browser it is.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg


How to remove advertisement from MSFN

#2
geezery

geezery

    Member

  • Member
  • PipPip
  • 254 posts
http://detectmobilebrowser.com/

#3
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,680 posts
  • OS:none specified
  • Country: Country Flag

Donator

The linked site should help you with the detection...the answer is yes, it is in the UA string. And yes, you can store cookies (you're probably wanting to use PHP sessions?) on phones.

#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,699 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

Yes I will be using PHP for the new site. I am still in the planning phase, already backed up the current site to be archived. Now to figure out how I will be arranging the data on the screen.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN