I successfully installed Tera-WURFL, but when I include the following code from your site, I get a Parsing/Syntax error message.
<?php
require_once '.../Tera-Wurfl/TeraWurfl.php';
$wurflObj = new TeraWurfl();
$wurflObj->getDeviceCapabilitiesFromAgent();
// see if this client is on a wireless device
if ($wurflObj->getDeviceCapability("is_wireless_device")) {
header("http://yourwebsite.mobi/");
}
?>
(I haven't redirected to the mobile site address yet.) The error message is:
Parse error: syntax error, unexpected T_IF in /..../header.php on line 7
in which line 7 is:
if ($wurflObj->getDeviceCapability("is_wireless_device")) {
PHP version is 5.2.17
Any help would be greatly appreciated. Thanks.