detecting browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

detecting browser

Post by shiznatix »

ok ya i use $_SERVER['HTTP_USER_AGENT'] and it gives me insaine amounts of stuff about the browser but all i want is the first word(s) up to the 1st / so it is just the browser name. using get_browser is not a option. im sure this is a preg_match situation but me/regular expessions = suicide due to insanity. help?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

explode() :P
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

haha wow im a idiot
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

shiznatix wrote:haha wow im a idiot
dont be so hard on yourself, we all have moments 8)
Post Reply