ldsmike88 Posted April 7, 2006 Share Posted April 7, 2006 I am trying to find out if "Windows NT 5.1" is contained in "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" or similar text. For example:[code]$userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';If($userAgent CONTAINS 'Windows NT 5.1'){ $os = 'Windows XP';}[/code]How do I do this?Thanks!Mike Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 7, 2006 Share Posted April 7, 2006 You want to look at the function [a href=\"http://www.php.net/strpos\" target=\"_blank\"]strpos[/a]().Ken Quote Link to comment Share on other sites More sharing options...
ldsmike88 Posted April 7, 2006 Author Share Posted April 7, 2006 Worked perfect. Exactly what I needed. Thanks!Mike Quote Link to comment 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.