| 1 |
<?php |
<?php |
| 2 |
// $Id: browscap.module,v 1.6.2.3.2.8 2009/09/17 15:04:47 greggles Exp $ |
// $Id: browscap.module,v 1.6.2.3.2.9 2009/09/17 15:19:14 greggles Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 284 |
} |
} |
| 285 |
} |
} |
| 286 |
|
|
| 287 |
|
/** |
| 288 |
|
* Determine whether the current visitor |
| 289 |
|
* |
| 290 |
|
* @param string $useragent |
| 291 |
|
* Optional user agent string. |
| 292 |
|
*/ |
| 293 |
|
function browscap_is_crawler($useragent = NULL) { |
| 294 |
|
$browser = browscap_get_browser($useragent); |
| 295 |
|
return (bool)$browser['crawler']; |
| 296 |
|
} |
| 297 |
|
|
| 298 |
// A numeric interpretation of browscap.csv's TRUE/FALSE/default fields |
// A numeric interpretation of browscap.csv's TRUE/FALSE/default fields |
| 299 |
function _browscap_boolean($value) { |
function _browscap_boolean($value) { |
| 300 |
switch ($value) { |
switch ($value) { |