PHPackages                             ocolin/maclookup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ocolin/maclookup

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ocolin/maclookup
================

Basic tool to look up vendor of a MAC address

3.6(4mo ago)23.2k↓50%MITPHP

Since Aug 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ocolin/MacLookup)[ Packagist](https://packagist.org/packages/ocolin/maclookup)[ RSS](/packages/ocolin-maclookup/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (21)Used By (0)

Mac Lookup
==========

[](#mac-lookup)

This was an experimental project to look for different ways to look up MAC address vendors for other tools. Now that some people are using it I will try to be mindful of not breaking it while experimenting.

Currently trying 3 methods to see which works best and will likely end up with options to use any of them. The methods I am trying are:

- Streaming the vendor content from a text file for low memory usage.
- Loading all vendor content into memory to increase speed up lookups.
- Loading from a database to see how it compares memory and speed wise.

!!! Version 4 will not be compatible with this one. !!!

Example results:

```
FILE LOOKUP
Memory used: 0.03 MB
Time: 0.0022971153259277

MEMORY LOOKUP
Memory used: 17.67 MB
Time: 0.0010538339614868

DB LOOKUP
Memory used: 0.02 MB
Time: 0.00094333489735921
```

To not interfere with the first implementation which is streaming from file I have made two new classes for the other methods. I will likely make a version 4 which will incorporate them all into one call since that will not be compatible with this current setup.

Installation
------------

[](#installation)

```
composer require ocolin/maclookup
```

Requirements
------------

[](#requirements)

PDO - Which should come built in to PHP. PHP 8.2 or higher.

Instantiation
-------------

[](#instantiation)

Using the MacLookup class does not need instantiation and is a completely static. However the memory and DB classes need instantiation for efficiency.

### Example

[](#example)

```
$lookup = Ocolin\MacLookup\MacMem();
```

```
$lookup = Ocolin\MacLookup\MacDB();
```

These will load what is needed and download the vendor content if missing and before being used.

Models
------

[](#models)

### DB version MacDB

[](#db-version-macdb)

```
$maclookup = Ocolin\MacLookup\MacDB();
$vendor = $lookup->lookup( mac: '54:91:AF:B2:02:3A' );
```

Example output:

```
Ocolin\MacLookup\Row Object
(
    [registry] => MA-L
    [assignment] => 302303
    [name] => Belkin International Inc.
    [address] => 12045 East Waterfront Drive Playa Vista null US 90094
)

```

### Memory version MacMem

[](#memory-version-macmem)

```
$maclookup = Ocolin\MacLookup\MacMem();
$vendor = $lookup->lookup( mac: '54:91:AF:B2:02:3A' );
```

### File version MacLookup

[](#file-version-maclookup)

```
$vendor = MacLookup::lookup( mac: '54:91:AF:B2:02:3A' );
```

Updating vendor list.
---------------------

[](#updating-vendor-list)

All three versions have an update() function. However the DB version needs to be instantiated to use the database.

Example:

```
// FILE
$status = Ocolin\MacLookup\MacLookup::update();

// MEMORY
$status = Ocolin\MacLookup\MacMem::update();

// DB
$status = Ocolin\MacLookup::update();
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance76

Regular maintenance activity

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~10 days

Total

20

Last Release

132d ago

Major Versions

1.4 → 2.02025-09-18

2.7 → 3.02025-11-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97ac0aa452b872ddc3f7f4c56c83852574a27bb74622f8c054d11ca20008fc9?d=identicon)[Ocolin](/maintainers/Ocolin)

---

Top Contributors

[![ocolin](https://avatars.githubusercontent.com/u/8870196?v=4)](https://github.com/ocolin "ocolin (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ocolin-maclookup/health.svg)

```
[![Health](https://phpackages.com/badges/ocolin-maclookup/health.svg)](https://phpackages.com/packages/ocolin-maclookup)
```

###  Alternatives

[ronanguilloux/php-gpio

GPIO-related utils &amp; toolkit PHP library

2678.0k](/packages/ronanguilloux-php-gpio)[daxslab/yii2-taggedview

Extension to help setup the standard HTML meta tags besides the ones defined by Opengraph and Twitter to contribute to website SEO

114.5k](/packages/daxslab-yii2-taggedview)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
