Hi everyone. I’m just looking for a redirect, an if-then-else type of thing I can put on a PHP page that will tell if the user is using a mobile device – i.e. Blackberry, iPhone and maybe a few others – and redirect them to my mobile site. I’m trying to find a server-side solution because Blackberries don’t read javascript. I’ve seen some partial & generic examples already, but I was hoping someone had or knew of some script that was ready to go.
I don’t need to include an exhaustive list of user agents or anything – I’m just trying to catch the most common mobile devices. If some go through to the regular site, it’s no big deal, I’ll have a button there, plus a javascript command to catch any iPhones. If I can get, like, 75% of mobile devices I’ll be happy.
Can anyone help? PHP total newbie here, in case it wasn’t obvious already. Thanks so much, and looking forward to your responses.