PHP Classes

PHP Mac Address Vendor Lookup: Get vendor information from mac address

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 183 All time: 8,683 This week: 78Up
Version License PHP version Categories
mac-vendors 1.0GNU General Publi...5.3Networking, PHP 5, Web services
Description 

Author

This class can get vendor information from mac address.

It takes a given mac address and sends a HTTP request to https://macvendors.co to get information of the device vendor.

The class can also take the vendor company name and obtains the mac address prefix.

Innovation Award
PHP Programming Innovation award nominee
January 2016
Number 5


Prize: SourceGuarding PHP encoder tool
Mac addresses are numbers that are associated to each hardware device.

The Mac addresses are formed in part with a number that identifiers the vendor that produced the device.

This class can be used to discover the company that produced a device using its mac address by calling the MacVendors.co Web service.

Manuel Lemos
Picture of Samy Massoud
  Performance   Level  
Name: Samy Massoud <contact>
Classes: 5 packages by
Country: Egypt Egypt
Age: 39
All time rank: 245024 in Egypt Egypt
Week rank: 227 Up3 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 2x

Example

<?php
include "src/MacvendorsApi.php";
use \
macvendors_co;

$api = new \macvendors_co\MacVendorsApi();
/**
Get And parse data to array

**/
$vendor = $api->get_vendor ("08:74:02:00:00:00",'csv');
echo
$vendor['company'].'<br/>';
echo
$vendor['mac_prefix'].'<br/>';
echo
$vendor['address'];

//Get raw data XML
$vendor = $api->get_vendor_xml("08:74:02:00:00:00");
echo
'<pre>'.$vendor.'</pre>' ;
//Get raw data CSV
$vendor = $api->get_vendor_csv("08:74:02:00:00:00");
echo
'<pre>'.$vendor.'</pre>' ;
//Get Raw data JSON
$vendor = $api->get_vendor_json("08:74:02:00:00:00");
echo
'<pre>'.$vendor.'</pre>' ;
//get raw data PIPE
$vendor = $api->get_vendor_pipe("08:74:02:00:00:00");
echo
'<pre>'.$vendor.'</pre>' ;


Details

Macvendors.co API in PHP

Overview

Lookup any vendor using mac address,or search by company name or address to get it's mac prefix.

This class is the implementation of macvendors.co API.

This class support alot of methods, please use the attached example.php file within this repository.

Support

For support please contact us via http://macvendors.co


  Files folder image Files (4)  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Composer File
Accessible without login Plain text file example.php Example Example how to use class
Accessible without login Plain text file readme.md Data read me file

  Files folder image Files (4)  /  src  
File Role Description
  Accessible without login Plain text file MacvendorsApi.php Class Source code

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:183
This week:0
All time:8,683
This week:78Up