给有需要的人用的,判断IP为国内还是国外。- <?php
- function is_ichinaip($ip){
- $cmip_ary=array(
- array('110.6.0.0','110.7.255.255'),
- array('110.16.0.0','110.19.255.255'),
- array('110.40.0.0','110.43.255.255'),
- array('110.48.0.0','110.48.255.255'),
- array('110.51.0.0','110.51.255.255'),
- array('110.52.0.0','110.53.255.255'),
- array('110.56.0.0','110.63.255.255'),
- array('110.64.0.0','110.65.255.255'),
- array('110.72.0.0','110.73.255.255'),
- array('110.75.0.0','110.75.255.255'),
- array('110.76.0.0','110.76.63.255'),
- array('110.76.192.0','110.76.255.255'),
- array('110.77.0.0','110.77.127.255'),
- array('110.80.0.0','110.87.255.255'),
- array('110.88.0.0','110.91.255.255'),
- array('110.94.0.0','110.95.255.255'),
- array('110.96.0.0','110.127.255.255'),
- array('110.152.0.0','110.155.255.255'),
- array('110.156.0.0','110.157.255.255'),
- array('110.166.0.0','110.167.255.255'),
- array('110.172.192.0','110.172.255.255'),
- array('110.173.0.0','110.173.31.255'),
- array('110.173.32.0','110.173.47.255'),
- array('110.173.64.0','110.173.127.255'),
- array('110.173.192.0','110.173.223.255'),
- array('110.176.0.0','110.191.255.255'),
- array('110.192.0.0','110.223.255.255'),
- array('110.228.0.0','110.231.255.255'),
- array('110.232.32.0','110.232.63.255'),
- array('110.236.0.0','110.237.255.255'),
- array('110.240.0.0','110.255.255.255'),
- array('111.0.0.0','111.63.255.255'),
- array('111.66.0.0','111.66.255.255'),
- array('111.67.192.0','111.67.207.255'),
- array('111.68.64.0','111.68.95.255'),
- array('111.72.0.0','111.79.255.255'),
- array('111.85.0.0','111.85.255.255'),
- array('111.91.192.0','111.91.223.255'),
- array('111.112.0.0','111.115.255.255'),
- array('111.116.0.0','111.117.255.255'),
- array('111.119.64.0','111.119.127.255'),
- array('111.119.128.0','111.119.159.255'),
- array('111.120.0.0','111.123.255.255'),
- array('111.124.0.0','111.124.255.255'),
- array('111.126.0.0','111.127.255.255'),
- array('111.128.0.0','111.159.255.255'),
- array('111.160.0.0','111.167.255.255'),
- array('111.170.0.0','111.170.255.255'),
- array('111.172.0.0','111.175.255.255'),
- array('111.176.0.0','111.183.255.255'),
- array('111.186.0.0','111.187.255.255'),
- array('111.192.0.0','111.207.255.255'),
- array('111.208.0.0','111.215.255.255'),
- array('111.221.128.0','111.221.255.255'),
- array('111.222.0.0','111.222.255.255'),
- array('111.224.0.0','111.231.255.255'),
- array('111.235.96.0','111.235.127.255'),
- array('111.235.160.0','111.235.191.255'),
- array('112.0.0.0','112.63.255.255'),
- array('112.64.0.0','112.67.255.255'),
- array('112.73.0.0','112.73.255.255'),
- array('112.74.0.0','112.75.255.255'),
- array('112.80.0.0','112.95.255.255'),
- array('112.96.0.0','112.103.255.255'),
- array('112.109.128.0','112.109.255.255'),
- array('112.111.0.0','112.111.255.255'),
- array('112.112.0.0','112.115.255.255'),
- array('112.116.0.0','112.117.255.255'),
- array('112.122.0.0','112.123.255.255'),
- array('112.124.0.0','112.127.255.255'),
- array('112.128.0.0','112.131.255.255'),
- array('112.132.0.0','112.132.255.255'),
- array('112.192.0.0','112.195.255.255'),
- array('112.224.0.0','112.255.255.255'),
- array('113.0.0.0','113.7.255.255'),
- array('113.8.0.0','113.9.255.255'),
- array('113.11.192.0','113.11.223.255'),
- array('113.12.0.0','113.15.255.255'),
- array('113.16.0.0','113.17.255.255'),
- array('113.18.0.0','113.18.255.255'),
- array('113.24.0.0','113.27.255.255'),
- array('113.31.0.0','113.31.255.255'),
- array('113.44.0.0','113.47.255.255'),
- array('113.48.0.0','113.51.255.255'),
- array('113.52.160.0','113.52.191.255'),
- array('113.54.0.0','113.55.255.255'),
- array('113.56.0.0','113.57.255.255'),
- array('113.58.0.0','113.58.255.255'),
- array('113.59.0.0','113.59.127.255'),
- array('113.62.0.0','113.63.255.255'),
- array('113.64.0.0','113.127.255.255'),
- array('113.128.0.0','113.129.255.255'),
- array('113.130.96.0','113.130.111.255'),
- array('113.130.112.0','113.130.119.255'),
- array('113.132.0.0','113.135.255.255'),
- array('113.136.0.0','113.143.255.255'),
- array('113.194.0.0','113.195.255.255'),
- array('113.200.0.0','113.201.255.255'),
- array('113.202.0.0','113.202.255.255'),
- array('113.204.0.0','113.207.255.255'),
- array('113.208.96.0','113.208.127.255'),
- array('113.208.128.0','113.208.255.255'),
- array('113.209.0.0','113.209.255.255'),
- array('113.212.0.0','113.212.63.255'),
- array('113.213.0.0','113.213.127.255'),
- array('113.214.0.0','113.215.255.255'),
- array('113.218.0.0','113.219.255.255'),
- array('113.220.0.0','113.223.255.255'),
- array('113.224.0.0','113.239.255.255'),
- array('113.240.0.0','113.247.255.255'),
- array('113.248.0.0','113.251.255.255'),
- array('114.28.0.0','114.28.255.255'),
- array('114.54.0.0','114.55.255.255'),
- array('114.60.0.0','114.63.255.255'),
- array('114.64.0.0','114.67.255.255'),
- array('114.68.0.0','114.68.255.255'),
- array('114.80.0.0','114.95.255.255'),
- array('114.96.0.0','114.103.255.255'),
- array('114.104.0.0','114.107.255.255'),
- array('114.110.0.0','114.110.15.255'),
- array('114.110.64.0','114.110.127.255'),
- array('114.110.128.0','114.110.255.255'),
- array('114.111.0.0','114.111.31.255'),
- array('114.111.160.0','114.111.191.255'),
- array('114.112.0.0','114.119.255.255'),
- array('114.132.0.0','114.132.255.255'),
- array('114.135.0.0','114.135.255.255'),
- array('114.138.0.0','114.139.255.255'),
- array('114.141.128.0','114.141.191.255'),
- array('114.196.0.0','114.197.255.255'),
- array('114.208.0.0','114.223.255.255'),
- array('114.224.0.0','114.255.255.255'),
- array('115.24.0.0','115.27.255.255'),
- array('115.28.0.0','115.29.255.255'),
- array('115.32.0.0','115.35.255.255'),
- array('115.44.0.0','115.47.255.255'),
- array('115.48.0.0','115.63.255.255'),
- array('115.84.0.0','115.84.63.255'),
- array('115.84.192.0','115.84.223.255'),
- array('115.85.192.0','115.85.255.255'),
- array('115.100.0.0','115.103.255.255'),
- array('115.104.0.0','115.107.255.255'),
- array('115.120.0.0','115.123.255.255'),
- array('115.124.16.0','115.124.31.255'),
- array('115.148.0.0','115.151.255.255'),
- array('115.152.0.0','115.159.255.255'),
- array('115.168.0.0','115.175.255.255'),
- array('115.180.0.0','115.183.255.255'),
- array('115.192.0.0','115.223.255.255'),
- array('115.224.0.0','115.239.255.255'),
- array('116.1.0.0','116.1.255.255'),
- array('116.2.0.0','116.3.255.255'),
- array('116.4.0.0','116.7.255.255'),
- array('116.8.0.0','116.11.255.255'),
- array('116.13.0.0','116.13.255.255'),
- array('116.16.0.0','116.31.255.255'),
- array('116.52.0.0','116.55.255.255'),
- array('116.56.0.0','116.57.255.255'),
- array('116.58.128.0','116.58.143.255'),
- array('116.58.208.0','116.58.223.255'),
- array('116.60.0.0','116.63.255.255'),
- array('116.66.0.0','116.66.127.255'),
- array('116.69.0.0','116.69.255.255'),
- array('116.70.0.0','116.70.127.255'),
- array('116.76.0.0','116.79.255.255'),
- array('116.89.144.0','116.89.159.255'),
- array('116.90.80.0','116.90.95.255'),
- array('116.90.184.0','116.90.191.255'),
- array('116.95.0.0','116.95.255.255'),
- array('116.112.0.0','116.115.255.255'),
- array('116.116.0.0','116.117.255.255'),
- array('116.128.0.0','116.191.255.255'),
- array('116.192.0.0','116.192.255.255'),
- array('116.193.16.0','116.193.31.255'),
- array('116.193.32.0','116.193.63.255'),
- array('116.194.0.0','116.195.255.255'),
- array('116.196.0.0','116.196.255.255'),
- array('116.198.0.0','116.198.255.255'),
- array('116.199.0.0','116.199.127.255'),
- array('116.199.128.0','116.199.159.255'),
- array('116.204.0.0','116.205.255.255'),
- array('116.207.0.0','116.207.255.255'),
- array('116.208.0.0','116.211.255.255'),
- array('116.212.160.0','116.212.175.255'),
- array('116.213.64.0','116.213.127.255'),
- array('116.213.128.0','116.213.255.255'),
- array('116.214.32.0','116.214.63.255'),
- array('116.214.64.0','116.214.79.255'),
- array('116.214.128.0','116.214.255.255'),
- array('116.215.0.0','116.215.255.255'),
- array('116.216.0.0','116.219.255.255'),
- array('116.224.0.0','116.239.255.255'),
- array('116.242.0.0','116.243.255.255'),
- array('116.244.0.0','116.247.255.255'),
- array('116.248.0.0','116.249.255.255'),
- array('116.252.0.0','116.253.255.255'),
- array('116.254.128.0','116.254.255.255'),
- array('116.255.128.0','116.255.255.255'),
- array('117.8.0.0','117.15.255.255'),
- array('117.21.0.0','117.21.255.255'),
- array('117.22.0.0','117.23.255.255'),
- array('117.24.0.0','117.31.255.255'),
- array('117.32.0.0','117.39.255.255'),
- array('117.40.0.0','117.43.255.255'),
- array('117.44.0.0','117.45.255.255'),
- array('117.48.0.0','117.51.255.255'),
- array('117.53.48.0','117.53.63.255'),
- array('117.53.176.0','117.53.191.255'),
- array('117.57.0.0','117.57.255.255'),
- array('117.58.0.0','117.58.127.255'),
- array('117.59.0.0','117.59.255.255'),
- array('117.60.0.0','117.63.255.255'),
- array('117.64.0.0','117.71.255.255'),
- array('117.72.0.0','117.73.255.255'),
- array('117.74.64.0','117.74.79.255'),
- array('117.74.128.0','117.74.255.255'),
- array('117.75.0.0','117.75.255.255'),
- array('117.76.0.0','117.79.255.255'),
- array('117.80.0.0','117.95.255.255'),
- array('117.100.0.0','117.101.255.255'),
- array('117.103.16.0','117.103.31.255'),
- array('117.103.128.0','117.103.143.255'),
- array('117.106.0.0','117.107.255.255'),
- array('117.112.0.0','117.119.255.255'),
- array('117.120.64.0','117.120.127.255'),
- array('117.120.128.0','117.120.255.255'),
- array('117.121.0.0','117.121.127.255'),
- array('117.121.128.0','117.121.191.255'),
- array('117.121.192.0','117.121.199.255'),
- array('117.122.128.0','117.122.255.255'),
- array('117.124.0.0','117.127.255.255'),
- array('117.128.0.0','117.191.255.255'),
- array('118.24.0.0','118.31.255.255'),
- array('118.64.0.0','118.65.255.255'),
- array('118.66.0.0','118.66.255.255'),
- array('118.67.112.0','118.67.127.255'),
- array('118.72.0.0','118.79.255.255'),
- array('118.80.0.0','118.81.255.255'),
- array('118.84.0.0','118.85.255.255'),
- array('118.88.32.0','118.88.63.255'),
- array('118.88.64.0','118.88.127.255'),
- array('118.88.128.0','118.88.255.255'),
- array('118.89.0.0','118.89.255.255'),
- array('118.91.240.0','118.91.255.255'),
- array('118.102.16.0','118.102.31.255'),
- array('118.112.0.0','118.119.255.255'),
- array('118.120.0.0','118.123.255.255'),
- array('118.124.0.0','118.125.255.255'),
- array('118.126.0.0','118.126.255.255'),
- array('118.132.0.0','118.135.255.255'),
- array('118.144.0.0','118.147.255.255'),
- array('118.178.0.0','118.178.255.255'),
- array('118.180.0.0','118.183.255.255'),
- array('118.184.0.0','118.191.255.255'),
- array('118.192.0.0','118.207.255.255'),
- array('118.212.0.0','118.213.255.255'),
- array('118.224.0.0','118.227.255.255'),
- array('118.228.0.0','118.229.255.255'),
- array('118.230.0.0','118.230.255.255'),
- array('118.239.0.0','118.239.255.255'),
- array('118.242.0.0','118.242.255.255'),
- array('118.244.0.0','118.247.255.255'),
- array('118.248.0.0','118.255.255.255'),
- array('119.0.0.0','119.1.255.255'),
- array('119.2.0.0','119.2.31.255'),
- array('119.2.128.0','119.2.255.255'),
- array('119.3.0.0','119.3.255.255'),
- array('119.4.0.0','119.7.255.255'),
- array('119.8.0.0','119.9.255.255'),
- array('119.10.0.0','119.10.127.255'),
- array('119.15.136.0','119.15.143.255'),
- array('119.16.0.0','119.16.255.255'),
- array('119.18.192.0','119.18.207.255'),
- array('119.18.208.0','119.18.215.255'),
- array('119.18.224.0','119.18.255.255'),
- array('119.19.0.0','119.19.255.255'),
- array('119.20.0.0','119.23.255.255'),
- array('119.27.64.0','119.27.127.255'),
- array('119.27.160.0','119.27.191.255'),
- array('119.27.192.0','119.27.255.255'),
- array('119.28.0.0','119.29.255.255'),
- array('119.30.48.0','119.30.63.255'),
- array('119.31.192.0','119.31.223.255'),
- array('119.32.0.0','119.39.255.255'),
- array('119.40.0.0','119.40.63.255'),
- array('119.40.64.0','119.40.79.255'),
- array('119.40.128.0','119.40.255.255'),
- array('119.41.0.0','119.41.255.255'),
- array('119.42.0.0','119.42.63.255'),
- array('119.42.136.0','119.42.143.255'),
- array('119.42.224.0','119.42.255.255'),
- array('119.44.0.0','119.45.255.255'),
- array('119.48.0.0','119.55.255.255'),
- array('119.57.0.0','119.57.255.255'),
- array('119.58.0.0','119.58.255.255'),
- array('119.59.128.0','119.59.255.255'),
- array('119.60.0.0','119.61.255.255'),
- array('119.62.0.0','119.62.255.255'),
- array('119.63.32.0','119.63.63.255'),
- array('119.75.208.0','119.75.223.255'),
- array('119.78.0.0','119.79.255.255'),
- array('119.80.0.0','119.81.255.255'),
- array('119.84.0.0','119.87.255.255'),
- array('119.88.0.0','119.91.255.255'),
- array('119.96.0.0','119.103.255.255'),
- array('119.108.0.0','119.109.255.255'),
- array('119.112.0.0','119.127.255.255'),
- array('119.128.0.0','119.143.255.255'),
- array('119.144.0.0','119.147.255.255'),
- array('119.148.160.0','119.148.175.255'),
- array('119.161.128.0','119.161.255.255'),
- array('119.162.0.0','119.163.255.255'),
- array('119.164.0.0','119.167.255.255'),
- array('119.176.0.0','119.191.255.255'),
- array('119.232.0.0','119.233.255.255'),
- array('119.235.128.0','119.235.191.255'),
- array('119.248.0.0','119.251.255.255'),
- array('119.253.0.0','119.253.255.255'),
- array('119.254.0.0','119.255.255.255'),
- array('120.0.0.0','120.15.255.255'),
- array('120.24.0.0','120.27.255.255'),
- array('120.30.0.0','120.31.255.255'),
- array('120.32.0.0','120.47.255.255'),
- array('120.48.0.0','120.49.255.255'),
- array('120.52.0.0','120.55.255.255'),
- array('120.64.0.0','120.71.255.255'),
- array('120.72.32.0','120.72.63.255'),
- array('120.72.128.0','120.72.255.255'),
- array('120.76.0.0','120.79.255.255'),
- array('120.80.0.0','120.87.255.255'),
- array('120.88.8.0','120.88.15.255'),
- array('120.90.0.0','120.91.255.255'),
- array('120.92.0.0','120.92.255.255'),
- array('120.94.0.0','120.95.255.255'),
- array('120.128.0.0','120.135.255.255'),
- array('120.136.128.0','120.136.191.255'),
- array('120.137.0.0','120.137.127.255'),
- array('120.192.0.0','120.255.255.255'),
- array('121.0.16.0','121.0.31.255'),
- array('121.4.0.0','121.5.255.255'),
- array('121.8.0.0','121.15.255.255'),
- array('121.16.0.0','121.31.255.255'),
- array('121.32.0.0','121.39.255.255'),
- array('121.40.0.0','121.43.255.255'),
- array('121.46.0.0','121.47.255.255'),
- array('121.48.0.0','121.49.255.255'),
- array('121.51.0.0','121.51.255.255'),
- array('121.52.160.0','121.52.191.255'),
- array('121.52.208.0','121.52.223.255'),
- array('121.52.224.0','121.52.255.255'),
- array('121.55.0.0','121.55.63.255'),
- array('121.56.0.0','121.57.255.255'),
- array('121.58.0.0','121.58.127.255'),
- array('121.58.144.0','121.58.159.255'),
- array('121.59.0.0','121.59.255.255'),
- array('121.60.0.0','121.63.255.255'),
- array('121.68.0.0','121.71.255.255'),
- array('121.76.0.0','121.77.255.255'),
- array('121.79.128.0','121.79.191.255'),
- array('121.89.0.0','121.89.255.255'),
- array('121.100.128.0','121.100.255.255'),
- array('121.101.208.0','121.101.223.255'),
- array('121.192.0.0','121.199.255.255'),
- array('121.201.0.0','121.201.255.255'),
- array('121.204.0.0','121.207.255.255'),
- array('121.224.0.0','121.239.255.255'),
- array('121.248.0.0','121.251.255.255'),
- array('121.255.0.0','121.255.255.255'),
- array('122.0.64.0','122.0.127.255'),
- array('122.0.128.0','122.0.255.255'),
- array('122.4.0.0','122.7.255.255'),
- array('122.8.0.0','122.15.255.255'),
- array('122.48.0.0','122.48.255.255'),
- array('122.49.0.0','122.49.63.255'),
- array('122.51.0.0','122.51.255.255'),
- array('122.64.0.0','122.95.255.255'),
- array('122.96.0.0','122.97.255.255'),
- array('122.102.0.0','122.102.15.255'),
- array('122.102.64.0','122.102.95.255'),
- array('122.112.0.0','122.115.255.255'),
- array('122.119.0.0','122.119.255.255'),
- array('122.136.0.0','122.143.255.255'),
- array('122.144.128.0','122.144.255.255'),
- array('122.152.192.0','122.152.255.255'),
- array('122.156.0.0','122.159.255.255'),
- array('122.192.0.0','122.195.255.255'),
- array('122.198.0.0','122.198.255.255'),
- array('122.200.64.0','122.200.127.255'),
- array('122.204.0.0','122.207.255.255'),
- array('122.224.0.0','122.239.255.255'),
- array('122.240.0.0','122.247.255.255'),
- array('122.248.48.0','122.248.63.255'),
- array('123.0.128.0','123.0.191.255'),
- array('123.4.0.0','123.7.255.255'),
- array('123.8.0.0','123.15.255.255'),
- array('123.49.128.0','123.49.255.255'),
- array('123.52.0.0','123.55.255.255'),
- array('123.56.0.0','123.63.255.255'),
- array('123.64.0.0','123.95.255.255'),
- array('123.96.0.0','123.97.255.255'),
- array('123.98.0.0','123.98.127.255'),
- array('123.99.128.0','123.99.255.255'),
- array('123.100.0.0','123.100.31.255'),
- array('123.101.0.0','123.101.255.255'),
- array('123.103.0.0','123.103.127.255'),
- array('123.108.128.0','123.108.143.255'),
- array('123.108.208.0','123.108.223.255'),
- array('123.112.0.0','123.127.255.255'),
- array('123.128.0.0','123.135.255.255'),
- array('123.136.80.0','123.136.95.255'),
- array('123.137.0.0','123.137.255.255'),
- array('123.138.0.0','123.139.255.255'),
- array('123.144.0.0','123.159.255.255'),
- array('123.160.0.0','123.175.255.255'),
- array('123.176.80.0','123.176.95.255'),
- array('123.177.0.0','123.177.255.255'),
- array('123.178.0.0','123.179.255.255'),
- array('123.180.0.0','123.183.255.255'),
- array('123.184.0.0','123.191.255.255'),
- array('123.196.0.0','123.197.255.255'),
- array('123.199.128.0','123.199.255.255'),
- array('123.206.0.0','123.207.255.255'),
- array('123.232.0.0','123.235.255.255'),
- array('123.242.0.0','123.242.127.255'),
- array('123.244.0.0','123.247.255.255'),
- array('123.249.0.0','123.249.255.255'),
- array('123.253.0.0','123.253.255.255'),
- array('124.6.64.0','124.6.127.255'),
- array('124.14.0.0','124.15.255.255'),
- array('124.16.0.0','124.17.255.255'),
- array('124.20.0.0','124.23.255.255'),
- array('124.28.192.0','124.28.255.255'),
- array('124.29.0.0','124.29.127.255'),
- array('124.31.0.0','124.31.255.255'),
- array('124.40.112.0','124.40.127.255'),
- array('124.40.128.0','124.40.191.255'),
- array('124.42.0.0','124.42.255.255'),
- array('124.47.0.0','124.47.63.255'),
- array('124.64.0.0','124.65.255.255'),
- array('124.66.0.0','124.66.127.255'),
- array('124.67.0.0','124.67.255.255'),
- array('124.68.0.0','124.71.255.255'),
- array('124.72.0.0','124.79.255.255'),
- array('124.88.0.0','124.95.255.255'),
- array('124.108.8.0','124.108.15.255'),
- array('124.108.40.0','124.108.47.255'),
- array('124.112.0.0','124.119.255.255'),
- array('124.126.0.0','124.127.255.255'),
- array('124.128.0.0','124.135.255.255'),
- array('124.147.128.0','124.147.255.255'),
- array('124.151.0.0','124.151.255.255'),
- array('124.156.0.0','124.156.255.255'),
- array('124.160.0.0','124.167.255.255'),
- array('124.172.0.0','124.175.255.255'),
- array('124.192.0.0','124.193.255.255'),
- array('124.196.0.0','124.196.255.255'),
- array('124.200.0.0','124.207.255.255'),
- array('124.220.0.0','124.223.255.255'),
- array('124.224.0.0','124.239.255.255'),
- array('124.240.0.0','124.240.127.255'),
- array('124.240.128.0','124.240.191.255'),
- array('124.242.0.0','124.242.255.255'),
- array('124.243.192.0','124.243.255.255'),
- array('124.248.0.0','124.248.127.255'),
- array('124.249.0.0','124.249.255.255'),
- array('124.250.0.0','124.251.255.255'),
- array('124.254.0.0','124.254.63.255'),
- array('125.31.192.0','125.31.255.255'),
- array('125.32.0.0','125.47.255.255'),
- array('125.58.128.0','125.58.255.255'),
- array('125.61.128.0','125.61.255.255'),
- array('125.62.0.0','125.62.63.255'),
- array('125.64.0.0','125.95.255.255'),
- array('125.96.0.0','125.97.255.255'),
- array('125.98.0.0','125.98.255.255'),
- array('125.104.0.0','125.111.255.255'),
- array('125.112.0.0','125.127.255.255'),
- array('125.169.0.0','125.169.255.255'),
- array('125.171.0.0','125.171.255.255'),
- array('125.208.0.0','125.208.63.255'),
- array('125.210.0.0','125.211.255.255'),
- array('125.213.0.0','125.213.127.255'),
- array('125.214.96.0','125.214.127.255'),
- array('125.215.0.0','125.215.63.255'),
- array('125.216.0.0','125.223.255.255'),
- array('125.254.128.0','125.254.255.255'),
- array('134.196.0.0','134.196.255.255'),
- array('159.226.0.0','159.226.255.255'),
- array('161.207.0.0','161.207.255.255'),
- array('162.105.0.0','162.105.255.255'),
- array('166.111.0.0','166.111.255.255'),
- array('167.139.0.0','167.139.255.255'),
- array('168.160.0.0','168.160.255.255'),
- array('180.76.0.0','180.79.255.255'),
- array('180.84.0.0','180.85.255.255'),
- array('180.86.0.0','180.86.255.255'),
- array('180.88.0.0','180.91.255.255'),
- array('180.94.56.0','180.94.63.255'),
- array('180.94.96.0','180.94.111.255'),
- array('180.95.128.0','180.95.255.255'),
- array('180.96.0.0','180.127.255.255'),
- array('180.129.128.0','180.129.255.255'),
- array('180.130.0.0','180.130.255.255'),
- array('180.136.0.0','180.143.255.255'),
- array('180.148.224.0','180.148.255.255'),
- array('180.149.128.0','180.149.159.255'),
- array('180.150.160.0','180.150.191.255'),
- array('180.152.0.0','180.159.255.255'),
- array('180.160.0.0','180.175.255.255'),
- array('180.178.192.0','180.178.255.255'),
- array('180.184.0.0','180.187.255.255'),
- array('180.188.0.0','180.188.127.255'),
- array('180.189.148.0','180.189.151.255'),
- array('180.201.0.0','180.201.255.255'),
- array('180.202.0.0','180.203.255.255'),
- array('180.208.0.0','180.209.255.255'),
- array('180.210.224.0','180.210.255.255'),
- array('180.212.0.0','180.213.255.255'),
- array('180.222.224.0','180.222.255.255'),
- array('180.223.0.0','180.223.255.255'),
- array('180.233.0.0','180.233.63.255'),
- array('180.233.64.0','180.233.95.255'),
- array('180.235.64.0','180.235.95.255'),
- array('183.0.0.0','183.63.255.255'),
- array('183.64.0.0','183.71.255.255'),
- array('183.84.0.0','183.85.255.255'),
- array('183.92.0.0','183.95.255.255'),
- array('183.128.0.0','183.255.255.255'),
- array('192.83.122.0','192.83.122.255'),
- array('192.83.169.0','192.83.169.255'),
- array('192.124.154.0','192.124.154.255'),
- array('192.188.170.0','192.188.170.255'),
- array('198.17.7.0','198.17.7.255'),
- array('202.0.110.0','202.0.110.255'),
- array('202.0.176.0','202.0.179.255'),
- array('202.4.128.0','202.4.159.255'),
- array('202.4.252.0','202.4.255.255'),
- array('202.8.128.0','202.8.159.255'),
- array('202.10.64.0','202.10.79.255'),
- array('202.14.88.0','202.14.88.255'),
- array('202.14.235.0','202.14.235.255'),
- array('202.14.236.0','202.14.237.255'),
- array('202.14.238.0','202.14.238.255'),
- array('202.20.120.0','202.20.120.255'),
- array('202.22.248.0','202.22.255.255'),
- array('202.38.0.0','202.38.15.255'),
- array('202.38.64.0','202.38.127.255'),
- array('202.38.128.0','202.38.135.255'),
- array('202.38.136.0','202.38.137.255'),
- array('202.38.138.0','202.38.138.255'),
- array('202.38.140.0','202.38.143.255'),
- array('202.38.144.0','202.38.147.255'),
- array('202.38.149.0','202.38.149.255'),
- array('202.38.150.0','202.38.151.255'),
- array('202.38.152.0','202.38.155.255'),
- array('202.38.156.0','202.38.156.255'),
- array('202.38.158.0','202.38.159.255'),
- array('202.38.160.0','202.38.161.255'),
- array('202.38.164.0','202.38.167.255'),
- array('202.38.168.0','202.38.175.255'),
- array('202.38.176.0','202.38.177.255'),
- array('202.38.184.0','202.38.191.255'),
- array('202.38.192.0','202.38.255.255'),
- array('202.41.152.0','202.41.159.255'),
- array('202.41.240.0','202.41.255.255'),
- array('202.43.76.0','202.43.79.255'),
- array('202.43.144.0','202.43.159.255'),
- array('202.46.32.0','202.46.63.255'),
- array('202.46.224.0','202.46.239.255'),
- array('202.60.112.0','202.60.127.255'),
- array('202.63.248.0','202.63.251.255'),
- array('202.69.4.0','202.69.7.255'),
- array('202.69.16.0','202.69.31.255'),
- array('202.70.0.0','202.70.31.255'),
- array('202.74.8.0','202.74.15.255'),
- array('202.75.208.0','202.75.223.255'),
- array('202.85.208.0','202.85.223.255'),
- array('202.90.0.0','202.90.3.255'),
- array('202.90.224.0','202.90.239.255'),
- array('202.90.252.0','202.90.255.255'),
- array('202.91.0.0','202.91.3.255'),
- array('202.91.128.0','202.91.131.255'),
- array('202.91.176.0','202.91.191.255'),
- array('202.91.224.0','202.91.255.255'),
- array('202.92.0.0','202.92.3.255'),
- array('202.92.252.0','202.92.255.255'),
- array('202.93.0.0','202.93.3.255'),
- array('202.93.252.0','202.93.255.255'),
- array('202.94.0.0','202.94.31.255'),
- array('202.95.0.0','202.95.31.255'),
- array('202.95.252.0','202.95.255.255'),
- array('202.96.0.0','202.111.255.255'),
- array('202.112.0.0','202.119.255.255'),
- array('202.120.0.0','202.121.255.255'),
- array('202.122.0.0','202.122.7.255'),
- array('202.122.32.0','202.122.39.255'),
- array('202.122.64.0','202.122.95.255'),
- array('202.122.112.0','202.122.119.255'),
- array('202.122.128.0','202.122.128.255'),
- array('202.123.96.0','202.123.111.255'),
- array('202.124.24.0','202.124.27.255'),
- array('202.125.176.0','202.125.191.255'),
- array('202.127.0.0','202.127.7.255'),
- array('202.127.12.0','202.127.15.255'),
- array('202.127.16.0','202.127.31.255'),
- array('202.127.40.0','202.127.47.255'),
- array('202.127.48.0','202.127.63.255'),
- array('202.127.112.0','202.127.127.255'),
- array('202.127.128.0','202.127.159.255'),
- array('202.127.160.0','202.127.167.255'),
- array('202.127.192.0','202.127.255.255'),
- array('202.130.0.0','202.130.31.255'),
- array('202.130.224.0','202.130.255.255'),
- array('202.131.16.0','202.131.23.255'),
- array('202.131.48.0','202.131.63.255'),
- array('202.131.208.0','202.131.223.255'),
- array('202.136.48.0','202.136.63.255'),
- array('202.136.208.0','202.136.223.255'),
- array('202.136.224.0','202.136.239.255'),
- array('202.136.252.0','202.136.255.255'),
- array('202.141.160.0','202.141.191.255'),
- array('202.142.16.0','202.142.31.255'),
- array('202.143.16.0','202.143.31.255'),
- array('202.148.96.0','202.148.127.255'),
- array('202.149.160.0','202.149.191.255'),
- array('202.149.224.0','202.149.255.255'),
- array('202.150.16.0','202.150.31.255'),
- array('202.152.176.0','202.152.191.255'),
- array('202.153.48.0','202.153.63.255'),
- array('202.158.160.0','202.158.191.255'),
- array('202.160.176.0','202.160.191.255'),
- array('202.164.0.0','202.164.15.255'),
- array('202.164.25.0','202.164.25.255'),
- array('202.165.96.0','202.165.111.255'),
- array('202.165.176.0','202.165.191.255'),
- array('202.165.208.0','202.165.223.255'),
- array('202.168.160.0','202.168.191.255'),
- array('202.170.128.0','202.170.159.255'),
- array('202.170.216.0','202.170.223.255'),
- array('202.173.8.0','202.173.15.255'),
- array('202.173.224.0','202.173.255.255'),
- array('202.179.240.0','202.179.255.255'),
- array('202.180.128.0','202.180.159.255'),
- array('202.181.112.0','202.181.127.255'),
- array('202.189.80.0','202.189.95.255'),
- array('202.192.0.0','202.207.255.255'),
- array('203.18.50.0','203.18.50.255'),
- array('203.78.48.0','203.78.63.255'),
- array('203.79.0.0','203.79.15.255'),
- array('203.80.144.0','203.80.159.255'),
- array('203.81.16.0','203.81.31.255'),
- array('203.83.56.0','203.83.63.255'),
- array('203.86.0.0','203.86.63.255'),
- array('203.86.64.0','203.86.95.255'),
- array('203.88.32.0','203.88.63.255'),
- array('203.88.192.0','203.88.223.255'),
- array('203.89.0.0','203.89.3.255'),
- array('203.90.0.0','203.90.3.255'),
- array('203.90.128.0','203.90.191.255'),
- array('203.90.192.0','203.90.223.255'),
- array('203.91.32.0','203.91.63.255'),
- array('203.91.96.0','203.91.111.255'),
- array('203.91.120.0','203.91.127.255'),
- array('203.92.0.0','203.92.3.255'),
- array('203.92.160.0','203.92.191.255'),
- array('203.93.0.0','203.93.255.255'),
- array('203.94.0.0','203.94.31.255'),
- array('203.95.0.0','203.95.7.255'),
- array('203.95.96.0','203.95.127.255'),
- array('203.99.16.0','203.99.31.255'),
- array('203.99.80.0','203.99.95.255'),
- array('203.100.32.0','203.100.47.255'),
- array('203.100.80.0','203.100.95.255'),
- array('203.100.96.0','203.100.127.255'),
- array('203.100.192.0','203.100.207.255'),
- array('203.110.160.0','203.110.191.255'),
- array('203.114.244.0','203.114.247.255'),
- array('203.118.192.0','203.118.223.255'),
- array('203.118.248.0','203.118.251.255'),
- array('203.119.24.0','203.119.31.255'),
- array('203.119.32.0','203.119.35.255'),
- array('203.128.32.0','203.128.63.255'),
- array('203.128.96.0','203.128.127.255'),
- array('203.128.128.0','203.128.159.255'),
- array('203.130.32.0','203.130.63.255'),
- array('203.132.32.0','203.132.63.255'),
- array('203.134.240.0','203.134.247.255'),
- array('203.135.96.0','203.135.127.255'),
- array('203.135.160.0','203.135.175.255'),
- array('203.142.219.0','203.142.219.255'),
- array('203.148.0.0','203.148.63.255'),
- array('203.152.64.0','203.152.95.255'),
- array('203.156.192.0','203.156.255.255'),
- array('203.158.16.0','203.158.23.255'),
- array('203.161.180.0','203.161.180.255'),
- array('203.161.192.0','203.161.223.255'),
- array('203.166.160.0','203.166.191.255'),
- array('203.171.224.0','203.171.239.255'),
- array('203.174.7.0','203.174.7.255'),
- array('203.174.96.0','203.174.127.255'),
- array('203.175.128.0','203.175.159.255'),
- array('203.175.192.0','203.175.255.255'),
- array('203.176.168.0','203.176.175.255'),
- array('203.184.80.0','203.184.95.255'),
- array('203.187.160.0','203.187.191.255'),
- array('203.190.96.0','203.190.111.255'),
- array('203.191.16.0','203.191.31.255'),
- array('203.191.64.0','203.191.127.255'),
- array('203.191.144.0','203.191.159.255'),
- array('203.192.0.0','203.192.31.255'),
- array('203.196.0.0','203.196.7.255'),
- array('203.207.64.0','203.207.127.255'),
- array('203.207.128.0','203.207.255.255'),
- array('203.208.0.0','203.208.15.255'),
- array('203.208.16.0','203.208.19.255'),
- array('203.208.32.0','203.208.63.255'),
- array('203.209.224.0','203.209.255.255'),
- array('203.212.0.0','203.212.15.255'),
- array('203.212.80.0','203.212.95.255'),
- array('203.222.192.0','203.222.207.255'),
- array('203.223.0.0','203.223.15.255'),
- array('210.2.0.0','210.2.31.255'),
- array('210.5.0.0','210.5.31.255'),
- array('210.5.128.0','210.5.159.255'),
- array('210.12.0.0','210.13.255.255'),
- array('210.14.64.0','210.14.95.255'),
- array('210.14.112.0','210.14.127.255'),
- array('210.14.128.0','210.14.255.255'),
- array('210.15.0.0','210.15.127.255'),
- array('210.15.128.0','210.15.191.255'),
- array('210.16.128.0','210.16.191.255'),
- array('210.21.0.0','210.21.255.255'),
- array('210.22.0.0','210.22.255.255'),
- array('210.23.32.0','210.23.63.255'),
- array('210.25.0.0','210.25.255.255'),
- array('210.26.0.0','210.27.255.255'),
- array('210.28.0.0','210.31.255.255'),
- array('210.32.0.0','210.47.255.255'),
- array('210.51.0.0','210.51.255.255'),
- array('210.52.0.0','210.53.255.255'),
- array('210.56.192.0','210.56.223.255'),
- array('210.72.0.0','210.75.255.255'),
- array('210.76.0.0','210.77.255.255'),
- array('210.78.0.0','210.78.255.255'),
- array('210.79.64.0','210.79.127.255'),
- array('210.79.224.0','210.79.255.255'),
- array('210.82.0.0','210.83.255.255'),
- array('210.87.128.0','210.87.191.255'),
- array('210.185.192.0','210.185.255.255'),
- array('210.192.96.0','210.192.127.255'),
- array('210.211.0.0','210.211.15.255'),
- array('211.64.0.0','211.71.255.255'),
- array('211.80.0.0','211.95.255.255'),
- array('211.96.0.0','211.103.255.255'),
- array('211.136.0.0','211.143.255.255'),
- array('211.144.0.0','211.159.255.255'),
- array('211.160.0.0','211.167.255.255'),
- array('218.0.0.0','218.31.255.255'),
- array('218.56.0.0','218.63.255.255'),
- array('218.64.0.0','218.95.255.255'),
- array('218.96.0.0','218.99.255.255'),
- array('218.104.0.0','218.107.255.255'),
- array('218.108.0.0','218.109.255.255'),
- array('218.185.192.0','218.185.223.255'),
- array('218.192.0.0','218.207.255.255'),
- array('218.240.0.0','218.247.255.255'),
- array('218.249.0.0','218.249.255.255'),
- array('219.72.0.0','219.72.255.255'),
- array('219.82.0.0','219.82.255.255'),
- array('219.128.0.0','219.159.255.255'),
- array('219.216.0.0','219.223.255.255'),
- array('219.224.0.0','219.239.255.255'),
- array('219.242.0.0','219.243.255.255'),
- array('219.244.0.0','219.247.255.255'),
- array('220.101.192.0','220.101.255.255'),
- array('220.112.0.0','220.115.255.255'),
- array('220.152.128.0','220.152.255.255'),
- array('220.154.0.0','220.155.255.255'),
- array('220.160.0.0','220.191.255.255'),
- array('220.192.0.0','220.207.255.255'),
- array('220.231.0.0','220.231.63.255'),
- array('220.231.128.0','220.231.255.255'),
- array('220.232.64.0','220.232.127.255'),
- array('220.234.0.0','220.234.255.255'),
- array('220.242.0.0','220.243.255.255'),
- array('220.248.0.0','220.251.255.255'),
- array('220.252.0.0','220.252.255.255'),
- array('221.0.0.0','221.7.255.255'),
- array('221.8.0.0','221.11.255.255'),
- array('221.12.0.0','221.12.127.255'),
- array('221.12.128.0','221.12.191.255'),
- array('221.13.0.0','221.13.255.255'),
- array('221.14.0.0','221.15.255.255'),
- array('221.122.0.0','221.123.255.255'),
- array('221.129.0.0','221.129.255.255'),
- array('221.130.0.0','221.131.255.255'),
- array('221.133.224.0','221.133.255.255'),
- array('221.136.0.0','221.137.255.255'),
- array('221.172.0.0','221.175.255.255'),
- array('221.176.0.0','221.183.255.255'),
- array('221.192.0.0','221.195.255.255'),
- array('221.196.0.0','221.197.255.255'),
- array('221.198.0.0','221.198.255.255'),
- array('221.199.0.0','221.199.127.255'),
- array('221.199.128.0','221.199.191.255'),
- array('221.199.192.0','221.199.207.255'),
- array('221.199.224.0','221.199.255.255'),
- array('221.200.0.0','221.207.255.255'),
- array('221.208.0.0','221.223.255.255'),
- array('221.224.0.0','221.239.255.255'),
- array('222.16.0.0','222.31.255.255'),
- array('222.32.0.0','222.63.255.255'),
- array('222.64.0.0','222.95.255.255'),
- array('222.125.0.0','222.125.255.255'),
- array('222.126.128.0','222.126.255.255'),
- array('222.128.0.0','222.143.255.255'),
- array('222.160.0.0','222.163.255.255'),
- array('222.168.0.0','222.175.255.255'),
- array('222.176.0.0','222.191.255.255'),
- array('222.192.0.0','222.223.255.255'),
- array('222.240.0.0','222.247.255.255'),
- array('222.248.0.0','222.249.255.255'),
- array('58.14.0.0','58.15.255.255'),
- array('58.16.0.0','58.23.255.255'),
- array('58.24.0.0','58.25.255.255'),
- array('58.30.0.0','58.31.255.255'),
- array('58.32.0.0','58.63.255.255'),
- array('58.66.0.0','58.67.255.255'),
- array('58.68.128.0','58.68.255.255'),
- array('58.82.0.0','58.83.255.255'),
- array('58.87.64.0','58.87.127.255'),
- array('58.99.128.0','58.99.255.255'),
- array('58.100.0.0','58.101.255.255'),
- array('58.116.0.0','58.119.255.255'),
- array('58.128.0.0','58.135.255.255'),
- array('58.144.0.0','58.144.255.255'),
- array('58.154.0.0','58.155.255.255'),
- array('58.192.0.0','58.223.255.255'),
- array('58.240.0.0','58.255.255.255'),
- array('59.32.0.0','59.63.255.255'),
- array('59.64.0.0','59.79.255.255'),
- array('59.80.0.0','59.83.255.255'),
- array('59.107.0.0','59.107.255.255'),
- array('59.108.0.0','59.111.255.255'),
- array('59.151.0.0','59.151.127.255'),
- array('59.155.0.0','59.155.255.255'),
- array('59.172.0.0','59.175.255.255'),
- array('59.191.0.0','59.191.127.255'),
- array('59.191.240.0','59.191.255.255'),
- array('59.192.0.0','59.255.255.255'),
- array('60.0.0.0','60.31.255.255'),
- array('60.55.0.0','60.55.255.255'),
- array('60.63.0.0','60.63.255.255'),
- array('60.160.0.0','60.191.255.255'),
- array('60.194.0.0','60.195.255.255'),
- array('60.200.0.0','60.207.255.255'),
- array('60.208.0.0','60.223.255.255'),
- array('60.232.0.0','60.233.255.255'),
- array('60.235.0.0','60.235.255.255'),
- array('60.245.128.0','60.245.255.255'),
- array('60.247.0.0','60.247.255.255'),
- array('60.252.0.0','60.252.255.255'),
- array('60.253.128.0','60.253.255.255'),
- array('60.255.0.0','60.255.255.255'),
- array('61.4.64.0','61.4.95.255'),
- array('61.4.176.0','61.4.191.255'),
- array('61.8.160.0','61.8.175.255'),
- array('61.28.0.0','61.28.127.255'),
- array('61.29.128.0','61.29.255.255'),
- array('61.45.128.0','61.45.191.255'),
- array('61.47.128.0','61.47.191.255'),
- array('61.48.0.0','61.55.255.255'),
- array('61.87.192.0','61.87.255.255'),
- array('61.128.0.0','61.191.255.255'),
- array('61.232.0.0','61.235.255.255'),
- array('61.236.0.0','61.237.255.255'),
- array('61.240.0.0','61.243.255.255'),
- );
- $ip_ary=explode('.',$ip);
- $ip=sprintf("%03d",$ip_ary[0]).".".sprintf("%03d",$ip_ary[1]).".".sprintf("%03d",$ip_ary[2]).".".sprintf("%03d",$ip_ary[3]);
- foreach($cmip_ary as $value){
- $ip_ary=explode('.',$value[0]);
- $sip=sprintf("%03d",$ip_ary[0]).".".sprintf("%03d",$ip_ary[1]).".".sprintf("%03d",$ip_ary[2]).".".sprintf("%03d",$ip_ary[3]);
- $ip_ary=explode('.',$value[1]);
- $eip=sprintf("%03d",$ip_ary[0]).".".sprintf("%03d",$ip_ary[1]).".".sprintf("%03d",$ip_ary[2]).".".sprintf("%03d",$ip_ary[3]);
- if($ip>=$sip && $ip<=$eip){
- return true;
- }
- }
- return false;
- }
- //上面为写的函数
- //以下为函数使用案例
- $ip='110.6.0.1';
- if(is_ichinaip($ip)){
- echo "中国";
- }else{
- echo "国外";
- }
- ?>
复制代码 |