Re: How to check out whether the client is a PC, a mobile phone or a PDA, etc.


[ Follow Ups ] [ Post Followup ] [ WAP Technical Discussion Forum ] [ FAQ ]

Posted by Kamlesh Nanda (216.6.88.196) on September 26, 2000 at 07:16:09:

In Reply to: Re: How to check out whether the client is a PC, a mobile phone or a PDA, etc. posted by Tore on September 24, 2000 at 22:10:34:

: Check out which browser the client is using, the browser is part of the request object, and then you know.

: Tore

: : Hi,
: : I am pretty new at this. I have a site in html which i wish to port to wml. So, whenever a client connects to my site (say - www.abc.com), the web server must be able to identify that the client is a normal PC, a mobile phone, a PDA or a palm top and depending on this, the client should be redirected to either my html pages or the wml pages, i.e. if the client is a PC he should be redirected to my html pages and if it is a mobile phone, he should be redirected to my wml pages.
: : How do I do this?
==> Here goes ur answer:
Probe the request headers which comea long with the request with a CGI or servlet. The header named as User-Agent gives u the value of the Client Browser. There is another solution to it also which is based on another header called 'Accept' which provides u the accepted mime-types of the client. U can parse the value of Accept header and can find out if it supports WML then push WML otherwise push HTML.

:-)




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ WAP Technical Discussion Forum ] [ FAQ ]