daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 29th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   try
  2.             {
  3.                 WebRequest webreq = WebRequest.Create("http://checkip.dyndns.org/");
  4.                 WebResponse response = webreq.GetResponse();
  5.                 StreamReader streamread = new StreamReader(response.GetResponseStream());
  6.                 HtmlAgilityPack.HtmlDocument htmldoc = new HtmlAgilityPack.HtmlDocument();
  7.                 htmldoc.Load(streamread);
  8.                 MessageBox.Show(htmldoc.DocumentNode.SelectSingleNode("//body").InnerText);
  9.             }
  10.             catch (Exception ex)
  11.             {
  12.                 MessageBox.Show("Ein Fehler ist aufgetreten: " + ex.ToString(), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
  13.                 throw;
  14.             }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top