Warning: You should not use the function iever($compare=false, $to=NULL) {} suggested by Joe because it has a big security issue.
Visitors could change their HTTP_USER_AGENT in order to make $m contain malicious PHP code that will be executed by eval()