(keitai-l) Re: How to find the phone serial no.

From: Nik Frengle <eseller_at_eimode.com>
Date: 08/20/01
Message-ID: <001001c12975$db2a9d00$0200a8c0@Sonet1>
> I will appreciate if you can be more elaborate on the solution as I have
not
> understood your solution.
Sorry Gupta,
I was in a bit of a hurry when I wrote that. While accurate, it was overly
brief. So, ok, you include utn in your link or form. How to use it?
> Suppose I create an HTML page with link suggested by you as above and give
> "url" to a servlet then how would I receive the attribute utn? Will it
come
> as an "utn" parameter to servlet?
No. Using the utn attribute tells the i-mode server to include the serial
number in the environmental variable HTTP_USER_AGENT information passed on
to the server a user is trying to access. The user agent information looks
like this:
DoCoMo/1.0/SO503i/c10/ser*********** (an actual serial number is a
combination of 11 letters and numbers)
You also get the cache setting, which in this case is set at 10kb, thus the
c10.
In PHP, which I use, it is a simple task to get this information:
$agent=getenv("HTTP_USER_AGENT");//be careful! In PHP 4 it only works with
all caps, though in PHP 3 it will work capitalized or not
$agentArray= split("/",$agent);
$browser=$agentArray[0];
$model=$agentArray[2];
$utn=substr($agentArray[4],-11,11);//DoCoMo says serial numbers are all 11
characters, so we look 11 characters from the end (thus the negative number)

I don't know if you even use PHP, but you get the idea, I think. You said
servelet, so you would need to look at what classes you have in Java to get
environmental variables. Probably there is plenty of support for this.
Sorry, I am less familiar with Java than I would wish.
BTW, I would tend to agree with Mike--all phones probably have this
capability, but only the newer ones allow the option of asking a user if
they want to send their serial number when not connected to an official
i-mode site. Because the older ones don't have this option, and because
DoCoMo don't want just anybody to be able to get a user's serial number
without their permission, non-official sites can't get this information
using older phones.

Cheers,
Nik



[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Mon Aug 20 15:27:45 2001