(keitai-l) Re: Javascript Use etc...

From: Darren Cook <darren_at_dcook.org>
Date: 01/13/03
Message-ID: <3E22852F.8040806@dcook.org>
>>where does one find the user agents for each carrier..?
> 
> There are sources out there, but if you are a one-man developer
> show, keep in mind that keeping this list and the properties
> of all phones up-to-date is a HUGE job. Also keep in mind that
> you should not rely on all the vendor information, you should
> check your pages also on as much phones as possible. The
> differences in rendering and phone behavior are still huge.

However the original post was about linking to gif/jpg, in which case 
just the general type (i vs. j vs. ez) is enough and not much maitenance.

E.g.

if(eregi("docomo.ne.jp", $REMOTE_HOST) ||
    eregi("DoCoMo",$HTTP_USER_AGENT)) { /* i-mode */ }
elseif (eregi("J-PHONE",$HTTP_USER_AGENT) ||
    isset($HTTP_X_JPHONE_MSNAME)) { /* j-phone */ }
else{
	/* web or ezweb */
	}

That is PHP code I wrote a long time ago and I'm not sure why I'm 
checking two things for each of i-mode and j-phone.

I believe web vs. ezweb can be decided because wap has no 
HTTP_USER_AGENT header.

Darren
Received on Mon Jan 13 11:36:07 2003