public static string GetGame() { PS3TMAPI.ProcessInfo processInfo = new PS3TMAPI.ProcessInfo(); PS3TMAPI.GetProcessInfo(0, ProcessID, out processInfo); string str = processInfo.Hdr.ELFPath.Split(new char[] { '/' })[3]; try { WebClient client = new WebClient(); ServicePointManager.ServerCertificateValidationCallback = (param0, param1, param2, param3) => true; return client.DownloadString("https://a0.ww.np.dl.playstation.net/tpl/np/" + str + "/" + str + "-ver.xml").Replace("<TITLE>", ";").Split(new char[] { ';' })[1].Replace("</TITLE>", ";").Split(new char[] { ';' })[0]; } catch { return str; } }
public string GetCurrentGame() { PS3TMAPI.ProcessInfo processInfo = new PS3TMAPI.ProcessInfo(); PS3TMAPI.GetProcessInfo(0, ProcessID(), out processInfo); string GameCode = processInfo.Hdr.ELFPath.Split('/')[3]; try { WebClient client = new System.Net.WebClient(); ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; string content = client.DownloadString(String.Format("https://a0.ww.np.dl.playstation.net/tpl/np/{0}/{1}-ver.xml", GameCode, GameCode)).Replace("<TITLE>", ";"); return(content.Split(';')[1].Replace("</TITLE>", ";").Split(';')[0].Replace("Â", "")); } catch { return("Unknown Game"); } }