MAC vendor lookup: Difference between revisions
Content added Content deleted
(→{{header|PHP}}: Add implementation.) |
|||
Line 890: | Line 890: | ||
</pre> |
</pre> |
||
=={{header| |
=={{header|PHP}}== |
||
{{trans|AppleScript}} |
|||
<lang PicoLisp>(load "@lib/http.l") |
|||
<lang php><?php |
|||
⚫ | |||
$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); |
|||
⚫ | |||
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); |
|||
⚫ | |||
} |
|||
(maclookup "88:53:2E:67:07:BE") ) |
|||
curl_close($curl); |
|||
(test |
|||
?></lang> |
|||
⚫ | |||
(maclookup "D4:F4:6F:C9:EF:8D") )</lang> |
|||
{{Out}} |
|||
⚫ | |||
⚫ | |||
Cisco Systems, Inc |
|||
PEGATRON CORPORATION |
|||
Dell Inc.</pre> |
|||
=={{header|PowerShell}}== |
=={{header|PowerShell}}== |