Posted by Breklin on 10/20/06 16:48
You can do this with Javascript or PHP. You will need to know the types
of browsers used by mobile devices (brand, version, etc).
Search Google for a Javascript using 'Javascript Browser Detection' as
your keywords.
- OR -
Use '$_SERVER['HTTP_USER_AGENT']' and do a search on the string returned
to get your Browser Type.
So something like this:
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox'))
echo 'Browser is Mozilla Firefox';
That's a very simplified approach. Again you can find plenty of examples
on the web via a well-formed Google query. Or, try phpclasses.org for a
canned solution.
Hope that helps you.
Maxx wrote:
> I need PHP code that check what browser ask my aplication first
>
>
>
> if it is normal (usual Internet browsers) than I'll go to normal.php bu if
> it is mobile phone browser than I go to mobile.php file...
>
>
>
> any advices?
>
>
>
[Back to original message]
|