ASP.NET实现根据IP获取省市地址的方法(2)

long ip_Int =0;
            long p1 =long.Parse(ipArr[0]) *256*256*256;
            long p2 =long.Parse(ipArr[1]) *256*256;
            long p3 =long.Parse(ipArr[2]) *256;
            long p4 =long.Parse(ipArr[3]);
            ip_Int = p1 + p2 + p3 + p4;
            return ip_Int;
        }//获取起始IP范围#region 获取起始IP范围 privatelong GetStartIp(long recNO)
        {
            long offSet = firstStartIp + recNO *7;
            //objfs.Seek(offSet,SeekOrigin.Begin);             objfs.Position = offSet;
            byte[] buff =new Byte[7];
            objfs.Read(buff, 0, 7);

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjzgpz.html