예제 #1
0
파일: IPHelper.cs 프로젝트: ljyit/DNSPodSrv
        public string  GetIP()
        {
            string cIP = "";

            try { cIP = IPHelper.GetIPFromDNSPod(); return(cIP); }
            catch { this.NotifyMsg("从DNSPOD获取IP失败"); }

            try { cIP = IPHelper.GetIpFromIp138(); return(cIP); }
            catch { this.NotifyMsg("从IP138获取IP失败"); }

            try { cIP = IPHelper.GetIpFromGreak(); return(cIP); }
            catch { this.NotifyMsg("从GreakIP失败"); }

            throw new Exception("用尽所有备用服务器");
        }
예제 #2
0
파일: IPHelper.cs 프로젝트: ljyit/DNSPodSrv
        public static string GetIpFromGreak()
        {
            string url = "http://greak.net/ip";

            return(IPHelper.GetIpByWeb(url, IPHelper._regGreak, "greak.net"));
        }
예제 #3
0
파일: IPHelper.cs 프로젝트: ljyit/DNSPodSrv
        public static string GetIpFromIp138()
        {
            string url = "http://www.ip138.com/ip2city.asp";

            return(IPHelper.GetIpByWeb(url, IPHelper._regIp138, "ip138"));
        }