/// <summary> /// Sends the usage stats to the official launchpad server. /// </summary> public static void SendUsageStats() { WebResponse sendStatsResponse = null; try { string formattedURL = $"{BaseURL}guid={Config.GetGameGUID()}" + $"&launcherVersion={Config.GetLocalLauncherVersion()}" + $"&gameName={Config.GetGameName()}" + $"&systemType={Config.GetSystemTarget()}" + $"&officialUpdates={Config.GetDoOfficialUpdates()}" + $"&installguid={ConfigHandler.GetInstallGUID()}"; WebRequest sendStatsRequest = WebRequest.Create(formattedURL); sendStatsResponse = sendStatsRequest.GetResponse(); } catch (WebException wex) { Log.Warn("Could not send usage stats (WebException): " + wex.Message); } finally { sendStatsResponse?.Dispose(); } }
/// <summary> /// Sends the usage stats to the official launchpad server. /// </summary> static public void SendUsageStats() { try { const string baseURL = "http://directorate.asuscomm.com/launchpad/stats.php?"; string formattedURL = String.Format(baseURL + "guid={0}&launcherVersion={1}&gameName={2}&systemType={3}&officialUpdates={4}&installguid={5}", Config.GetGameGUID(), Config.GetLocalLauncherVersion(), Config.GetGameName(), Config.GetSystemTarget(), Config.GetDoOfficialUpdates(), Config.GetInstallGUID() ); WebRequest sendStatsRequest = WebRequest.Create(formattedURL); sendStatsRequest.GetResponse(); } catch (WebException wex) { Console.WriteLine("WebException in SendUsageStats(): " + wex.Message); } }