|
112 | 112 |
|
113 | 113 | <script> |
114 | 114 | var country_iplists = [ |
115 | | - // Define IPv4 country lists |
116 | | - { name: "[IPv4] Country - Canada", source: "http://ipverse.net/ipblocks/data/countries/ca.zone" }, |
117 | | - { name: "[IPv4] Country - China", source: "http://ipverse.net/ipblocks/data/countries/cn.zone" }, |
118 | | - { name: "[IPv4] Country - France", source: "http://ipverse.net/ipblocks/data/countries/fr.zone" }, |
119 | | - { name: "[IPv4] Country - Germany", source: "http://ipverse.net/ipblocks/data/countries/de.zone" }, |
120 | | - { name: "[IPv4] Country - India", source: "http://ipverse.net/ipblocks/data/countries/in.zone" }, |
121 | | - { name: "[IPv4] Country - Netherlands", source: "http://ipverse.net/ipblocks/data/countries/nl.zone" }, |
122 | | - { name: "[IPv4] Country - Romania", source: "http://ipverse.net/ipblocks/data/countries/ro.zone" }, |
123 | | - { name: "[IPv4] Country - Russia", source: "http://ipverse.net/ipblocks/data/countries/ru.zone" }, |
124 | | - { name: "[IPv4] Country - Spain", source: "http://ipverse.net/ipblocks/data/countries/es.zone" }, |
125 | | - { name: "[IPv4] Country - Switzerland", source: "http://ipverse.net/ipblocks/data/countries/ch.zone" }, |
126 | | - { name: "[IPv4] Country - Turkey", source: "http://ipverse.net/ipblocks/data/countries/tr.zone" }, |
127 | | - { name: "[IPv4] Country - Ukraine", source: "http://ipverse.net/ipblocks/data/countries/ua.zone" }, |
128 | | - { name: "[IPv4] Country - United Kingdom", source: "http://ipverse.net/ipblocks/data/countries/gb.zone" }, |
129 | | - { name: "[IPv4] Country - United States", source: "http://ipverse.net/ipblocks/data/countries/us.zone" }, |
130 | | - |
| 115 | + <?php |
| 116 | + $country = array('ca' => 'Canada', 'cn' => 'China', 'fr' => 'French', 'de' => 'Germany', 'in' => 'India', 'nl' => 'Netherlands', 'ro' => 'Romania', 'ru' => 'Russia', 'es' => 'Spain', 'ch' => 'Switzerland', 'tr' => 'Turkey', 'ua' => 'Ukraine', 'uk' => 'United Kingdom', 'us' => 'United States'); |
| 117 | + foreach($country as $iso =>$name){ |
| 118 | + echo '{name: "[IPV] Country - '.$name.'", source:"https://raw.githubusercontent.com/ipverse/rir-ip/master/country/'.$iso.'/ipv4-aggregated.txt"},'."\n"; |
| 119 | + } |
| 120 | + ?> |
131 | 121 | // Define IPv6 country lists |
132 | 122 | /* |
133 | | - {name: "[IPv6] Country - China", source:"http://ipverse.net/ipblocks/data/countries/cn-ipv6.zone"}, |
134 | | - {name: "[IPv6] Country - Canada", source:"http://ipverse.net/ipblocks/data/countries/ca-ipv6.zone"}, |
135 | | - {name: "[IPv6] Country - France", source:"http://ipverse.net/ipblocks/data/countries/fr-ipv6.zone"}, |
136 | | - {name: "[IPv6] Country - Germany", source:"http://ipverse.net/ipblocks/data/countries/de-ipv6.zone"}, |
137 | | - {name: "[IPv6] Country - India", source:"http://ipverse.net/ipblocks/data/countries/in-ipv6.zone"}, |
138 | | - {name: "[IPv6] Country - Netherlands", source:"http://ipverse.net/ipblocks/data/countries/nl-ipv6.zone"}, |
139 | | - {name: "[IPv6] Country - Romania", source:"http://ipverse.net/ipblocks/data/countries/ro-ipv6.zone"}, |
140 | | - {name: "[IPv6] Country - Russia", source:"http://ipverse.net/ipblocks/data/countries/ru-ipv6.zone"}, |
141 | | - {name: "[IPv6] Country - Spain", source:"http://ipverse.net/ipblocks/data/countries/es-ipv6.zone"}, |
142 | | - {name: "[IPv6] Country - Switzerland", source:"http://ipverse.net/ipblocks/data/countries/ch-ipv6.zone"}, |
143 | | - {name: "[IPv6] Country - Ukraine", source:"http://ipverse.net/ipblocks/data/countries/ua-ipv6.zone"}, |
144 | | - {name: "[IPv6] Country - United Kingdom", source:"http://ipverse.net/ipblocks/data/countries/gb-ipv6.zone"}, |
145 | | - {name: "[IPv6] Country - United States", source:"http://ipverse.net/ipblocks/data/countries/us-ipv6.zone"}, |
| 123 | + <?php |
| 124 | + foreach($country as $iso =>$name){ |
| 125 | + echo '{name: "[IPV] Country - '.$name.'", source:"https://raw.githubusercontent.com/ipverse/rir-ip/master/country/'.$iso.'/ipv4-aggregated.txt"},'."\n"; |
| 126 | + } |
| 127 | + ?> |
146 | 128 | */ |
147 | 129 | ]; |
148 | 130 |
|
|
0 commit comments