Advertisement
Guest User

Using Piwik Device Detector without the rest.

a guest
May 13th, 2015
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. // I figured it out.  Pretty easy.  Grab a copy of master and make a few mods.
  2.  
  3. // At the top of DeviceDetector.php and in this order:
  4.  
  5. require_once (dirname(__FILE__).'/spyc.php');
  6.  
  7. require_once (dirname(__FILE__).'/Cache/Cache.php');
  8. require_once (dirname(__FILE__).'/Cache/StaticCache.php');
  9.  
  10. require_once (dirname(__FILE__).'/Parser/ParserAbstract.php');
  11.  
  12. require_once (dirname(__FILE__).'/Parser/Bot.php');
  13. require_once (dirname(__FILE__).'/Parser/OperatingSystem.php');
  14. require_once (dirname(__FILE__).'/Parser/VendorFragment.php');
  15.  
  16. require_once (dirname(__FILE__).'/Parser/Client/ClientParserAbstract.php');
  17. require_once (dirname(__FILE__).'/Parser/Device/DeviceParserAbstract.php');
  18.  
  19. // Add as the first line of addClientParser():
  20.         require_once (dirname(__FILE__).'/Parser/Client/'.$parser.'.php');
  21.  
  22. // Add as the first line of addDeviceParser():
  23.         require_once (dirname(__FILE__).'/Parser/Device/'.$parser.'.php');
  24.  
  25. // You'll also have to grab a copy of spyc.php - google it - easy to find.
  26.  
  27. // That's it.  Works awesome.  Faster than anything else.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement