title: Getting a HeartBeat from a C# Application and Posting it To Website
body: <p>I've got a Minecraft Software written in C# that I want to send a heartbeat to my site. I've got the way to send the beat already written.</p>
  
  <pre><code> if (Server.Uri == null) return;
          string uri = "http://GemsCraft.comli.com/Heartbeat.php";
          // create a request
          try
          {
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
              request.Method = "POST";
  
              // turn request string into a byte stream
              byte[] postBytes = Encoding.ASCII.GetBytes(string.Format("ServerName={0}&amp;Url={1}&amp;Players={2}&amp;MaxPlayers={3}&amp;Uptime={4}",
                               Uri.EscapeDataString(ConfigKey.ServerName.GetString()),
                               Server.Uri,
                               Server.Players.Length,
                               ConfigKey.MaxPlayers.GetInt(),
                               DateTime.UtcNow.Subtract(Server.StartTime).TotalMinutes));
  
              request.ContentType = "application/x-www-form-urlencoded";
              request.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
              request.ContentLength = postBytes.Length;
              request.Timeout = 5000;
              Stream requestStream = request.GetRequestStream();
  
              // send it
              requestStream.Write(postBytes, 0, postBytes.Length);
              requestStream.Flush();
              requestStream.Close();
              /* try
               {
                  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                  Logger.LogToConsole(new StreamReader(response.GetResponseStream()).ReadToEnd());
                  Logger.LogToConsole(response.StatusCode + "\n");
               }
               catch (Exception ex)
               {
                   Logger.LogToConsole("" + ex);
               }*/
          }
  </code></pre>
  
  <p>Now, I want to be able to retrieve the heartbeat in PHP, upload it to the SQL database, and then display each user's server in a table that will be displayed on the webpage</p>
  
  <p>How do I do this?</p>