
Andrea Trasatti - 2006-07-03 17:20:06 -
In reply to message 1 from Ketil Stadskleiv
What you can do is initialize the class. Take the array of user agents, cycle through all of them and read brand and model.
Not hard. It will run for a while, like 1 minute or two.
I suggest that you check the actual_device_root attribute.
Something like this:
$wurflObj = new wurfl_class($wurfl, $wurfl_agents);
foreach ($wurflObj->_wurfl_agents as $id) {
if ( $_cached_devices[$id]['actual_device_root'] == 'true' ) {
$wurflObj->GetDeviceCapabilitiesFromAgent($_cached_devices[$id]['user_agent']);
$output_vals['oem'] = $wurflObj->getDeviceCapability('brand_name');
$output_vals['model'] = $wurflObj->getDeviceCapability('model_name');
}
}
print_r($output_vals);
I haven't tested this, just copied and pasted from existing code. Validate it.