Detect phone via WML

Detect phone via WML SearchSearch
Author Message
lars mservice
Posted on Friday, June 06, 2003 - 12:42 pm:   

If you wap up at SonyEricsson, the page you enter recognizes wich phone you have.

How is that possible ?

Anyone experienced in sml scripting that got at small bit of code to share ?
Kent Williams
Posted on Friday, June 06, 2003 - 04:26 pm:   

Lars,

Take a look at the User-Agent header that comes in from the phone. That will have a string that identifies the phone.

- Kent Williams
Now Wireless Support
lars mservice
Posted on Saturday, June 14, 2003 - 10:29 am:   

Ok. i've made some scipting that logs the useragent and it works fine. But only if it is an .asp file that i use.
IS it possible in WML to get the useragent?
Bryce Norwood - NowSMS Support
Posted on Saturday, June 14, 2003 - 05:11 pm:   

In static WML, no ... not even with WMLScript.

It needs to be in server side scripting to have access to the HTTP headers.

-bn
lars mservice
Posted on Saturday, June 14, 2003 - 08:07 pm:   

ok.

Benn spending some hours today creating what i call; Filter.asp which i put in the top of the page that the phones enters before retrieving their content. Works great, but the only thing that worries me is that the phones now have to go to a .asp file rather than a .wml file. Even though in asp you have the response.contenttype, i really am not sure that all phones can enter anything but .wml, but i will test it with all the phones i can find, and post it here.

I will also post the useragent data that the phones tell about them selves.

Maybe some of you have links to sites where they post this, so that we can save time in testing all phones ourselves???

;)Lars
Kent Williams
Posted on Monday, June 16, 2003 - 03:32 am:   

Lars,

I would not worry about the file extension. Many WML sites are dynamically generated using ASP or PHP. What is important is that the "Content-type:" header gets set correctly in the HTTP response header.

(For image types, some phones do have some expectation that you will use a known file extension. For example, if an "a href" points to a link that has a ".gif" or ".jpg" extension, the T68i behaves differently than other extensions, and displays a "receive item" dialog that allows you to receive an image into the phone that is larger than the WAP browser itself can display.)

- Kent Williams
Now Wireless Support
lars msService
Posted on Monday, June 16, 2003 - 10:12 am:   

Thats right. Actually by doing a href directly to the imagefile, you can use filesize as it was a mms message. We allready use that today.
I have put my new script online, so that all my pushes links to an .asp file, and i log the useragent. So i allready have quite a list of phones in there.

I will post them later when the list is bigger.

If any of you need some now, mail me

;)Lars
lars@mservice.dk