And that's why we have regular expression, and modules which do these things. Get what you need from the USER_AGENT string and match in your keys. Instead of trying to nay-say suggestions, why don't think think of the whole picture of what is available to be done. So, this guy should keep looping through all the user agents? That's absurd.