#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Detect Mobile Devices, browser issues (wurfl)


    I have been struggling for a while now with getting wurfl to work properly. It works well in Firefox, but not in IE, Chrome or Opera. What I am mainly after is the is_wireless_device capability.

    This is my php code to test if things work ok (it builds on the examples):
    Code:
    <?php
    require_once "WURFL/WURFLManagerProvider.php";
    $wurflConfigFile = "/home/checkout1/public_html/templates/ttrd/mobile_detect/resources/wurfl-config.xml";
    $wurflManager = WURFL_WURFLManagerProvider::getWURFLManager($wurflConfigFile);	
    $requestingDevice = $wurflManager->getDeviceForHttpRequest($_SERVER);
    ?>
    Requesting Browser User Agent: <b> <?php echo $_SERVER["HTTP_USER_AGENT"] ?> </b>
    <ul>
    <li>ID: <?php echo $requestingDevice->id ?> </li>
    <li>Brand Name: <?php echo $requestingDevice->getCapability("brand_name") ?> </li>
    <li>Model Name: <?php echo $requestingDevice->getCapability("model_name") ?> </li>
    <li>Xhtml Preferred Markup: <?php echo $requestingDevice->getCapability("preferred_markup") ?> </li>
    <li>Resolution Width: <?php echo $requestingDevice->getCapability("resolution_width") ?> </li>
    <li>Resolution Height: <?php echo $requestingDevice->getCapability("resolution_height") ?> </li>
    <li>Is Wireless Device: <?php echo $requestingDevice->getCapability("is_wireless_device"); ?> </li>
    </ul>
    This is my wurfl-config.xml file:
    Code:
    <wurfl-config>
        <wurfl>
            <main-file>wurfl.xml</main-file>
            <patches>
            	<patch>web_browsers_patch.xml</patch>
            </patches>        	       
        </wurfl>
        <persistance>
        	<provider>file</provider>
        	<params>dir=../cache</params>
        </persistance>
        <cache>
        	<provider>file</provider>
        	<params>dir=../cache</params>
        </cache>
    </wurfl-config>
    I would suspect that the problem had something to do with the wurfl patch, but I cannot seem to figure it out. I have the newest files of everything: wurfl, web_browsers_patch and the php API.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Posts
    4
    Rep Power
    0
    if you are having issues with getting wurfl streamlined to meet your requirements, you might want to check out one of the web services built on the front of wurfl such as handsetdetection.com

    It could save you some time..

    Comments on this post

    • ManiacDan disagrees : Stop spamming for that site, we can see all your posts you know

IMN logo majestic logo threadwatch logo seochat tools logo