I've been playing with your script...
...for my site, and you need to define what $ua is before you can use it:
$ua = @find_environmental("HTTP_USER_AGENT");
Then you can do a string compare on the value of $ua to determine if someone is surfing from a mobile browser...
|