MAC vendor lookup: Difference between revisions

→‎{{header|PHP}}: Add implementation.
(→‎{{header|PHP}}: Add implementation.)
Line 890:
</pre>
 
=={{header|PicoLispPHP}}==
{{trans|AppleScript}}
<lang PicoLisp>(load "@lib/http.l")
<lang php><?php
$apiRoot (client= "https://api.macvendors.com" 80;
$macList = array("88:53:2E:67:07:BE", "D4:F4:6F:C9:EF:8D",
"FC:FB:FB:01:FA:21", "4c:72:b9:56:fe:bc", "00-14-22-01-23-45");
 
$curl = curl_init();
(de maclookup (M)
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
(client "api.macvendors.com" 80
foreach ($macList as $burger) {
M
curl_setopt($curl, CURLOPT_URL, "$apiRoot/$burger");
(while (line))
echo(curl_exec($curl));
(line T) ) )
echo("\n");
(test
sleep(2);
"Intel Corporate"
}
(maclookup "88:53:2E:67:07:BE") )
curl_close($curl);
(test
?></lang>
"Apple, Inc."
 
(maclookup "D4:F4:6F:C9:EF:8D") )</lang>
{{Out}}
"<pre>Intel Corporate"
"Apple, Inc."
Cisco Systems, Inc
PEGATRON CORPORATION
Dell Inc.</pre>
 
=={{header|PowerShell}}==
1,480

edits