Example #1
0
        public static bool IsInIPDuan(string strCurrIP, string strBeginIP, string strEndIP)
        {
            int[] array  = new int[4];
            int[] array2 = IPUtils.IP2IntArr(strCurrIP);
            int[] array3 = IPUtils.IP2IntArr(strBeginIP);
            array = IPUtils.IP2IntArr(strEndIP);
            int  i = 0;
            bool result;

            while (i < 4)
            {
                if (array2[i] < array3[i] || array2[i] > array[i])
                {
                    result = false;
                }
                else
                {
                    if (array2[i] <= array3[i] && array2[i] >= array[i])
                    {
                        i++;
                        continue;
                    }
                    result = true;
                }
                return(result);
            }
            result = true;
            return(result);
        }
Example #2
0
 public static TaoBaoAreaInfo GetIPAreaFromTaoBao()
 {
     return(IPUtils.GetIPAreaFromTaoBao(IPUtils.GetIP()));
 }
Example #3
0
 public static SinaIPAreaInfo GetIPAreaFromSina()
 {
     return(IPUtils.GetIPAreaFromSina(string.Empty));
 }