Henri
public void Is_Alive() { bool onko; string sisaltaa = "Third-party server not responding"; string tietoteksti = "No info"; string vahdattava = "http://www.hereisurl.com"; WebClient myWebClient = new WebClient(); byte[] bufferi = myWebClient.DownloadData(vahdattava); string tulos = Encoding.ASCII.GetString(bufferi); onko = tulos.Contains(sisaltaa); if (onko == true) { tietoteksti = "Changes!"; SystemSounds.Exclamation.Play(); downtimelaskuri(); if (viimeksikinalhaalla==false) { kyykyta(); } if (notifyIcon1.Visible == true) { notifyIcon1.ShowBalloonTip(30, "Wake up!", "Changes!", ToolTipIcon.Warning); } viimeksikinalhaalla=true; } else { tietoteksti = "It's the same."; viimeksikinalhaalla=false; } label1.Text = tietoteksti; }