The MAC Address Vendor search API allows you to make queries via our database and fetch information about any MAC address. This is very simple HTTP GET request and its easily to integrate into your software.

Examples

Raw URL request:

http://mymac.pp.ua/api/raw/MAC_ADDRESS

Simple PHP class:

<?php
    
class SearchMac {

    const 
URL 'http://mymac.pp.ua/api/raw/';

    private 
$emptyNotice 'Empty data received';
    private 
$formatNotice 'Wrong MAC format';

    
/*
     * Checks is MAC address valid?
     * 
     * @param $mac      target mac address
     * 
     * @return bool
     */

    
private function checkMacFormat($mac) {
        
$mask '/^[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}$/i';
        if (
preg_match($mask$mac)) {
            return (
true);
        } else {
            return (
false);
        }
    }

    
/*
     * Returns vendor/manufacturer name by mac address
     * 
     * @param $mac      target mac address
     * 
     * @return string
     */

    
public function lookup($mac) {
        if (
$this->checkMacFormat($mac)) {
            
$rawdata file_get_contents(self::URL $mac);
            if (!empty(
$rawdata)) {
                
$result $rawdata;
            } else {
                
$result $this->emptyNotice;
            }
        } else {
            
$result $this->formatNotice;
        }
        return (
$result);
    }

}

/*
 *  Example of usage
 */
$mac='e8:ba:70:c6:49:fa';
$look = new SearchMac();
$vendor=$look->lookup($mac);
print(
$vendor);

?>