UA_List.inc.php 689 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @license MIT License https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt
  4. * @link http://mobiledetect.net
  5. *
  6. * Compile the providers list.
  7. * The providers list is updated weekly.
  8. * You can contribute by adding new user agents and tests.
  9. */
  10. // Setup.
  11. $includeBasePath = dirname(__FILE__) . '/providers/vendors';
  12. $list = array();
  13. // Scan.
  14. $dir = new DirectoryIterator($includeBasePath);
  15. foreach ($dir as $fileInfo) {
  16. if ($fileInfo->isDot()) {
  17. continue;
  18. }
  19. $listNew = include $includeBasePath . '/' . $fileInfo->getFilename();
  20. if (is_array($listNew)) {
  21. $list = array_merge($list, $listNew);
  22. }
  23. }
  24. return $list;