MAC vendor lookup: Difference between revisions

Added AutoHotkey
(Added AutoHotkey)
Line 8:
 
A MAC address that does not return a valid result should return the String "N/A". A error related to the network connectivity or the API should return a null result.
 
=={{header|AutoHotkey}}==
<lang AutoHotkey>macLookup(MAC){
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", "http://api.macvendors.com/" MAC)
WebRequest.Send()
return WebRequest.ResponseText
}</lang>
Examples:<lang AutoHotkey>MsgBox % macLookup("00-14-22-01-23-45")</lang>
Outputs:<pre>Dell Inc.</pre>
 
=={{header|C sharp|C#}}==
299

edits