Detect phone via WML | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through September 15, 2003 ⬆ |
◄ ► |
Author | Message | |||
lars mservice |
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 |
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 |
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 |
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 |
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 |
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 |
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 |