WebResponse response = request.GetResponse();
private void findvendorButton_Click(object sender, EventArgs e) { string cell = ""; System.IO.StreamReader reader; WebRequest request = WebRequest.Create("http://www.macvendorlookup.com/api/v2/{" + macaddressTextBox.Text + "}"); request.Timeout = 120000; WebResponse response = request.GetResponse(); reader = new System.IO.StreamReader(response.GetResponseStream()); string get = reader.ReadToEnd(); MatchCollection m1 = Regex.Matches(get, @"(company)(.*?)(}])", RegexOptions.Singleline); foreach (Match m in m1) { cell = m.Groups[0].Value; } vendorTextBox.Text = cell.Trim().Split('\"')[2].ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)