public static IEnumerable <string> getUserNames(int pageNum) { string content = ShallerConnector.getPageContent("showmembers.php?Cat=&sb=13&page=" + pageNum + "&showlite=l", new Dictionary <string, string>(), new System.Net.CookieContainer()); Regex matcher = new Regex(";User=([^&]+)&", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase); MatchCollection matches = matcher.Matches(content); HashSet <string> result = new HashSet <string>(); foreach (Match match in matches) { result.Add(HttpUtility.UrlDecode(match.Groups[1].Value, ShallerConnector.encoding).Trim()); } return(result); }
public static string getUserInfoAsString(string userName) { //if(userName != HttpUtility.UrlEncode(userName, ShallerConnector.encoding)) throw new ApplicationException("'" + userName + "':showprofile.php?User="******"&What=login&showlite=l"); return(ShallerConnector.getPageContent("showprofile.php?User="******"&What=login&showlite=l", new Dictionary <string, string>(), new System.Net.CookieContainer())); }