PHP - Searching a String

31 January 2009, 11:23 PM

Handy script for search a string of data to find information required

$user_agent = $_SERVER['HTTP_USER_AGENT']; // Client Brower

// Search string for Windows XP (Microsoft Build 5.1)

if(stristr($user_agent,'NT 5.1'))
{
$os = "Windows XP";
} else {
$os = "Other Windows OS";
}

 


Categories

All
General
Applications
Code
Networking
 

 

 

Recent blog posts

4

Cent OS adding port into iptables - command line SSH
4 August 2013, 10:06 AM - Read More
   

17

Convert NSTimeInterval to NSString - iOS Development
17 September 2012, 4:38 PM - Read More
   

12

Find string in NSArray and return index of string - iOS Development
12 September 2012, 3:54 PM - Read More
   

Recent apps

Slots!
Read More
   
MobileRota
Read More
   
Eleven2
Read More
   

 

Customer Support

Need help with a product?
Product Support


Contact

Drop us a line?
hello@olliekett.com
   
Follow us on Twitter
@okdltd