function carrier() { //USER_AGENTで判断しキャリア別に文字列を返す。 //iモード→i、EZweb→e、Vodafone→v、その他→o //各キャリアに含まれる文字列 $voda[0] = "J-PHONE"; $voda[1] = "Vodafone"; $voda[2] = "MOT-V980"; $voda[3] = "MOT-C980"; $voda[4] = "SoftBank"; $docomo[0] = "DoCoMo"; $ez[0] = "UP.Browser"; //キャリアごとの処理 if (Mobile::agentCheck($docomo) !== false) { //docomo iモード return "i"; } elseif (Mobile::agentCheck($voda) !== false) { //vodafone VodafoneLive! return "v"; } elseif (Mobile::agentCheck($ez) !== false) { //AU EZWeb return "e"; } else { //その他 return "o"; } }