\SearchMAC
SearchMAC class that performs MAC address vendor lookup
Synopsis
class SearchMAC
{
- // constants
- const CACHE_KEY = 'MACVENDB';
- // members
- protected array $altCfg = ;
- protected bool $cacheFlag = false;
- protected $cache = '';
- protected integer $cacheTime = 2592000;
- protected array $vendorCache = ;
- protected integer $httpCode = 0;
- protected string $agentString = '';
- // methods
- public void __construct()
- protected void loadConfig()
- protected void initCache()
- protected void loadCache()
- protected void setUserAgent()
- public string getVendor()
- protected string lookupMacVendor()
Constants
| Name | Value |
|---|---|
| CACHE_KEY | 'MACVENDB' |
Members
protected
- $agentString
—
string
User agent string - $altCfg
- $cache
—
system cache object placeholder - $cacheFlag
—
bool
Vendor cache flag - $cacheTime
—
int
Cache time in seconds - $httpCode
—
int
HTTP code from last request - $vendorCache
—
array
Preloaded vendor cache
Methods
protected
- initCache() — Initializes cache object
- loadCache() — Loads cache from system cache
- loadConfig() — Loads configuration and sets some options
- lookupMacVendor() — Retuns vendor name for some MAC address
- setUserAgent() — Sets user agent string
public
- __construct() — imprisoned in a web of night in search of an emerald sky
- getVendor() — Returns vendor name for some MAC address using optional caching