Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Changing the world while working at @KanteronSystems

Pablo Hinojosa Pablohn26

💭
Changing the world while working at @KanteronSystems
View GitHub Profile
@Pablohn26
Pablohn26 / gist:063e0a36947861ea89fdf896156b6aa6
Created Jun 18, 2018 — forked from bkilshaw/gist:3624901
MACVendors.com API :: PHP GET Example
View gist:063e0a36947861ea89fdf896156b6aa6
<?php
$mac_address = "FC:FB:FB:01:FA:21";
$url = "https://api.macvendors.com/" . urlencode($mac_address);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if($response) {
echo "Vendor: $response";