Created
February 22, 2012 17:22
-
-
Save pushmon/1886168 to your computer and use it in GitHub Desktop.
C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
namespace TeamEXtension | |
{ | |
public class UrlPing | |
{ | |
public static void Main(string[] args) | |
{ | |
string urlString = "http://pshmn.com/eaFnY"; | |
try { | |
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(urlString); | |
HttpWebResponse response = (HttpWebResponse) request.GetResponse(); | |
} | |
catch (Exception e) { | |
// log error | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simpler implementation: