You are here: Re: how check between normal and mobile phone browser? « All PHP « IT news, forums, messages
Re: how check between normal and mobile phone browser?

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?
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация