Tera-WURFL kullanarak Cep Telefonu algılama

0 Cevap

Ben oyunlar için bir wap portalı geliştirmek. Benim sorunum mükemmel yakışıklı cihaz tespit etmektir. Benim oyun sağlayıcısı bana böyle desteklenen yakışıklı listesini sağlamak:

Nokia6300, SGH-X200, MOT-C261, DİE-CX70, SAMSUNG SGH-Z140

Yani, belirli wap kullanıcı için desteklenen oyunlar algılamak zorundayız.

Ben kolayca komuta altında kullanarak nokia cihazlar için yakışıklı algılayabilir:

require_once('../TeraWurfl.php'); 
$wurflObj = new TeraWurfl();
$matched = $wurflObj->getDeviceCapabilitiesFromAgent();
$brand_name = $wurflObj->getDeviceCapability("brand_name");
$model_name = $wurflObj->getDeviceCapability("model_name");
$handset=$brand_name. $model_name;

/ / Nokia6300, Nokia6600 vb

But the problem is for siemence ,Motorola ,some Samsung sets,and lot of others. Let say the user agent:

SIE-CX70/36 UP.Browser/7.0.2.2.156 (GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1

Provide me the model name: CX70 and Brand Name: Siemens. So if I concatenate then get the value: SiemensCX70.But the actual is: SIE-CX70. So, Information mis-match.

Now my question is how can I detection the perfect handset. Please help me to retrieve the actual info.

Thanks riad

0 Cevap