aggiunta user agent...

This commit is contained in:
Samuele E. Locatelli
2017-11-14 12:40:13 +01:00
parent 7304f607a9
commit 63ea4a8302
+1 -1
View File
@@ -1038,7 +1038,6 @@ namespace IOB_WIN
IPInterfaceProperties properties = adapter.GetIPProperties();
//sMacAddress = adapter.GetPhysicalAddress().ToString();
sMacAddress = string.Join(":", (from z in adapter.GetPhysicalAddress().GetAddressBytes() select z.ToString("X2")).ToArray());
//sMacAddress = properties.UnicastAddresses[0].Address.ToString();
}
}
return sMacAddress;
@@ -1086,6 +1085,7 @@ namespace IOB_WIN
{
string answ = "";
var client = new WebClient();
client.Headers.Add("user-agent", utils.CRS("appName"));
answ = client.DownloadString(URL);
// restituisco valore!
return answ;