brem13 Posted June 2, 2011 Share Posted June 2, 2011 hey, im using the $_SERVER['HTTP_USER_AGENT']; code to find the users browser. now, i get "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1". when i run the script how would i use preg match, to just get the 'Safari' from that??? Quote Link to comment https://forums.phpfreaks.com/topic/238253-browser-detection-to-just-show-internet-explorer-safari-firefox-etc/ Share on other sites More sharing options...
jcbones Posted June 2, 2011 Share Posted June 2, 2011 If your host has browscap enabled, you could use get_browser() to do it. Otherwise, you could use search google. If you did that, I would suggest the 4th or 5th link. Quote Link to comment https://forums.phpfreaks.com/topic/238253-browser-detection-to-just-show-internet-explorer-safari-firefox-etc/#findComment-1224376 Share on other sites More sharing options...
brem13 Posted June 2, 2011 Author Share Posted June 2, 2011 thank you! i used the 4th link! Quote Link to comment https://forums.phpfreaks.com/topic/238253-browser-detection-to-just-show-internet-explorer-safari-firefox-etc/#findComment-1224397 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.