- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
public static string DownloadString(string Url, bool UnZip = false)
{
var v = Configs.Instance.MainURL + Url;
if (!CheckOnServer(v))
return "";
using (var wb = new WebClient())
{
if (UnZip)
v = Encoding.UTF8.GetString(IoUtils.UnZip(wb.DownloadData(v)));
else
v = wb.DownloadString(v);
if (v.StartsWith(((char)65279).ToString())) v = v.Substring(1);//utf8 header -_-
}
return v;
}
igorkrets 15.03.2015 13:30 # 0