void GetSubscription(string uri) { string result = Welcome.HTTPRequest(uri); if (!result.Contains("Subscription error") || result != "") { subNow = Welcome.ParseBetween(result, "{CURRENT}", "{/CURRENT}"); subEx = Welcome.ParseBetween(result, "{SUBEX}", "{/SUBEX}"); Console.WriteLine("now: " + subNow + ", subex: " + subEx); } if (subNow != "" && subEx != "") { DateTime d_subNow = Convert.ToDateTime(subNow); DateTime d_subEx = Convert.ToDateTime(subEx); TimeSpan difference = d_subEx - d_subNow; subExInMinutes = Convert.ToInt32(difference.TotalMinutes); if (subExInMinutes <= 0) { this.Invoke((Action)(() => { Application.ExitThread(); Application.Exit(); Environment.Exit(0); // Exit the program })); } } }
private bool Deregister() { //http://steamgrouper.com/app/dereg.php string hwid = Welcome.HWID(); string hwid_hash = Welcome.CreatePasswordHash(hwid, "waylaidwanderer1158"); string baseURL = "http://steamgrouper.com/app/dereg.php"; string uri = baseURL + "?username="******"&hwid=" + hwid_hash; string result = Welcome.HTTPRequest(uri); if (result != "done") { return(false); } return(true); }