Changeset 3444439
- Timestamp:
- 01/21/2026 10:33:11 PM (2 months ago)
- Location:
- ip2location-redirection/trunk
- Files:
-
- 41 added
- 7 deleted
- 13 edited
-
ip2location-redirection.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/bin (deleted)
-
vendor/composer/ClassLoader.php (modified) (24 diffs)
-
vendor/composer/InstalledVersions.php (added)
-
vendor/composer/autoload_classmap.php (modified) (1 diff)
-
vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
vendor/composer/autoload_psr4.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
vendor/composer/installed.json (modified) (1 diff)
-
vendor/composer/installed.php (added)
-
vendor/composer/platform_check.php (added)
-
vendor/ip2location/ip2location-php/.gitattributes (deleted)
-
vendor/ip2location/ip2location-php/.github (added)
-
vendor/ip2location/ip2location-php/.github/workflows (added)
-
vendor/ip2location/ip2location-php/.github/workflows/test.yml (added)
-
vendor/ip2location/ip2location-php/.gitignore (deleted)
-
vendor/ip2location/ip2location-php/.readthedocs.yaml (added)
-
vendor/ip2location/ip2location-php/ChangeLog (deleted)
-
vendor/ip2location/ip2location-php/IP2Location.php (deleted)
-
vendor/ip2location/ip2location-php/LICENSE.TXT (modified) (1 diff)
-
vendor/ip2location/ip2location-php/README.md (modified) (4 diffs)
-
vendor/ip2location/ip2location-php/composer.json (modified) (1 diff)
-
vendor/ip2location/ip2location-php/data (added)
-
vendor/ip2location/ip2location-php/data/IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV (added)
-
vendor/ip2location/ip2location-php/data/IP2LOCATION-ISO3166-2.CSV (added)
-
vendor/ip2location/ip2location-php/data/IP2LOCATION-LITE-DB1.BIN (added)
-
vendor/ip2location/ip2location-php/data/IP2LOCATION-LITE-DB1.IPV6.BIN (added)
-
vendor/ip2location/ip2location-php/databases (deleted)
-
vendor/ip2location/ip2location-php/docs (added)
-
vendor/ip2location/ip2location-php/docs/Makefile (added)
-
vendor/ip2location/ip2location-php/docs/make.bat (added)
-
vendor/ip2location/ip2location-php/docs/requirements.txt (added)
-
vendor/ip2location/ip2location-php/docs/source (added)
-
vendor/ip2location/ip2location-php/docs/source/code.md (added)
-
vendor/ip2location/ip2location-php/docs/source/conf.py (added)
-
vendor/ip2location/ip2location-php/docs/source/images (added)
-
vendor/ip2location/ip2location-php/docs/source/images/favicon.ico (added)
-
vendor/ip2location/ip2location-php/docs/source/images/ipl-logo-square-1200.png (added)
-
vendor/ip2location/ip2location-php/docs/source/index.md (added)
-
vendor/ip2location/ip2location-php/docs/source/quickstart.md (added)
-
vendor/ip2location/ip2location-php/example.php (deleted)
-
vendor/ip2location/ip2location-php/examples (added)
-
vendor/ip2location/ip2location-php/examples/example.php (added)
-
vendor/ip2location/ip2location-php/ip2location_bin_download.php (added)
-
vendor/ip2location/ip2location-php/phpunit.xml (added)
-
vendor/ip2location/ip2location-php/src (added)
-
vendor/ip2location/ip2location-php/src/Country.php (added)
-
vendor/ip2location/ip2location-php/src/Database.php (added)
-
vendor/ip2location/ip2location-php/src/IpTools.php (added)
-
vendor/ip2location/ip2location-php/src/Region.php (added)
-
vendor/ip2location/ip2location-php/src/WebService.php (added)
-
vendor/ip2location/ip2location-php/tests (added)
-
vendor/ip2location/ip2location-php/tests/CountryTest.php (added)
-
vendor/ip2location/ip2location-php/tests/DatabaseTest.php (added)
-
vendor/ip2location/ip2location-php/tests/IpToolsTest.php (added)
-
vendor/ip2location/ip2location-php/tests/RegionTest.php (added)
-
vendor/ip2location/ip2location-php/tests/WebServiceTest.php (added)
-
vendor/ip2location/ip2location-php/tests/bootstrap.php (added)
Legend:
- Unmodified
- Added
- Removed
-
ip2location-redirection/trunk/ip2location-redirection.php
r3442117 r3444439 5 5 * Plugin URI: https://ip2location.com/resources/wordpress-ip2location-redirection 6 6 * Description: Redirect visitors by their country. 7 * Version: 1.3 6.17 * Version: 1.37.0 8 8 * Requires PHP: 7.4 9 9 * Author: IP2Location -
ip2location-redirection/trunk/readme.txt
r3442117 r3444439 5 5 Requires at least: 4.6 6 6 Tested up to: 6.9 7 Stable tag: 1.3 6.17 Stable tag: 1.37.0 8 8 9 9 Redirects visitors to a blog page or a predefined URL based on their country and region geolocated using IP address. … … 63 63 64 64 == Changelog == 65 * 1.37.0 Updated to the latest version of IP2Location library. 65 66 * 1.36.1 Fixed implicit conversion of mask to int. 66 67 * 1.36.0 Added rule statistics, advance path matching, dialog prompt, and automatically BIN database updates. -
ip2location-redirection/trunk/vendor/autoload.php
r2386040 r3444439 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 4b9a83d71f3c1c85c2d163d8335d1ad5::getLoader();25 return ComposerAutoloaderInite0393f7122caeb6588f3264c0dea39ef::getLoader(); -
ip2location-redirection/trunk/vendor/composer/ClassLoader.php
r2386040 r3444439 38 38 * @author Fabien Potencier <fabien@symfony.com> 39 39 * @author Jordi Boggiano <j.boggiano@seld.be> 40 * @see http ://www.php-fig.org/psr/psr-0/41 * @see http ://www.php-fig.org/psr/psr-4/40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 42 42 */ 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 49 private $vendorDir; 50 45 51 // PSR-4 52 /** 53 * @var array<string, array<string, int>> 54 */ 46 55 private $prefixLengthsPsr4 = array(); 56 /** 57 * @var array<string, list<string>> 58 */ 47 59 private $prefixDirsPsr4 = array(); 60 /** 61 * @var list<string> 62 */ 48 63 private $fallbackDirsPsr4 = array(); 49 64 50 65 // PSR-0 66 /** 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 72 */ 51 73 private $prefixesPsr0 = array(); 74 /** 75 * @var list<string> 76 */ 52 77 private $fallbackDirsPsr0 = array(); 53 78 79 /** @var bool */ 54 80 private $useIncludePath = false; 81 82 /** 83 * @var array<string, string> 84 */ 55 85 private $classMap = array(); 86 87 /** @var bool */ 56 88 private $classMapAuthoritative = false; 89 90 /** 91 * @var array<string, bool> 92 */ 57 93 private $missingClasses = array(); 94 95 /** @var string|null */ 58 96 private $apcuPrefix; 59 97 98 /** 99 * @var array<string, self> 100 */ 101 private static $registeredLoaders = array(); 102 103 /** 104 * @param string|null $vendorDir 105 */ 106 public function __construct($vendorDir = null) 107 { 108 $this->vendorDir = $vendorDir; 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 114 */ 60 115 public function getPrefixes() 61 116 { 62 117 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', $this->prefixesPsr0);118 return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); 64 119 } 65 120 … … 67 122 } 68 123 124 /** 125 * @return array<string, list<string>> 126 */ 69 127 public function getPrefixesPsr4() 70 128 { … … 72 130 } 73 131 132 /** 133 * @return list<string> 134 */ 74 135 public function getFallbackDirs() 75 136 { … … 77 138 } 78 139 140 /** 141 * @return list<string> 142 */ 79 143 public function getFallbackDirsPsr4() 80 144 { … … 82 146 } 83 147 148 /** 149 * @return array<string, string> Array of classname => path 150 */ 84 151 public function getClassMap() 85 152 { … … 88 155 89 156 /** 90 * @param array $classMap Class to filename map 157 * @param array<string, string> $classMap Class to filename map 158 * 159 * @return void 91 160 */ 92 161 public function addClassMap(array $classMap) … … 103 172 * appending or prepending to the ones previously set for this prefix. 104 173 * 105 * @param string $prefix The prefix 106 * @param array|string $paths The PSR-0 root directories 107 * @param bool $prepend Whether to prepend the directories 174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 177 * 178 * @return void 108 179 */ 109 180 public function add($prefix, $paths, $prepend = false) 110 181 { 182 $paths = (array) $paths; 111 183 if (!$prefix) { 112 184 if ($prepend) { 113 185 $this->fallbackDirsPsr0 = array_merge( 114 (array)$paths,186 $paths, 115 187 $this->fallbackDirsPsr0 116 188 ); … … 118 190 $this->fallbackDirsPsr0 = array_merge( 119 191 $this->fallbackDirsPsr0, 120 (array)$paths192 $paths 121 193 ); 122 194 } … … 127 199 $first = $prefix[0]; 128 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 129 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 130 202 131 203 return; … … 133 205 if ($prepend) { 134 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 135 (array)$paths,207 $paths, 136 208 $this->prefixesPsr0[$first][$prefix] 137 209 ); … … 139 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 140 212 $this->prefixesPsr0[$first][$prefix], 141 (array)$paths213 $paths 142 214 ); 143 215 } … … 148 220 * appending or prepending to the ones previously set for this namespace. 149 221 * 150 * @param string $prefix The prefix/namespace, with trailing '\\'151 * @param array|string $paths The PSR-4 base directories152 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 153 225 * 154 226 * @throws \InvalidArgumentException 227 * 228 * @return void 155 229 */ 156 230 public function addPsr4($prefix, $paths, $prepend = false) 157 231 { 232 $paths = (array) $paths; 158 233 if (!$prefix) { 159 234 // Register directories for the root namespace. 160 235 if ($prepend) { 161 236 $this->fallbackDirsPsr4 = array_merge( 162 (array)$paths,237 $paths, 163 238 $this->fallbackDirsPsr4 164 239 ); … … 166 241 $this->fallbackDirsPsr4 = array_merge( 167 242 $this->fallbackDirsPsr4, 168 (array)$paths243 $paths 169 244 ); 170 245 } … … 176 251 } 177 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 178 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 179 254 } elseif ($prepend) { 180 255 // Prepend directories for an already registered namespace. 181 256 $this->prefixDirsPsr4[$prefix] = array_merge( 182 (array)$paths,257 $paths, 183 258 $this->prefixDirsPsr4[$prefix] 184 259 ); … … 187 262 $this->prefixDirsPsr4[$prefix] = array_merge( 188 263 $this->prefixDirsPsr4[$prefix], 189 (array)$paths264 $paths 190 265 ); 191 266 } … … 196 271 * replacing any others previously set for this prefix. 197 272 * 198 * @param string $prefix The prefix 199 * @param array|string $paths The PSR-0 base directories 273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 275 * 276 * @return void 200 277 */ 201 278 public function set($prefix, $paths) … … 212 289 * replacing any others previously set for this namespace. 213 290 * 214 * @param string $prefix The prefix/namespace, with trailing '\\'215 * @param array|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 216 293 * 217 294 * @throws \InvalidArgumentException 295 * 296 * @return void 218 297 */ 219 298 public function setPsr4($prefix, $paths) … … 235 314 * 236 315 * @param bool $useIncludePath 316 * 317 * @return void 237 318 */ 238 319 public function setUseIncludePath($useIncludePath) … … 257 338 * 258 339 * @param bool $classMapAuthoritative 340 * 341 * @return void 259 342 */ 260 343 public function setClassMapAuthoritative($classMapAuthoritative) … … 277 360 * 278 361 * @param string|null $apcuPrefix 362 * 363 * @return void 279 364 */ 280 365 public function setApcuPrefix($apcuPrefix) … … 297 382 * 298 383 * @param bool $prepend Whether to prepend the autoloader or not 384 * 385 * @return void 299 386 */ 300 387 public function register($prepend = false) 301 388 { 302 389 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 390 391 if (null === $this->vendorDir) { 392 return; 393 } 394 395 if ($prepend) { 396 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; 397 } else { 398 unset(self::$registeredLoaders[$this->vendorDir]); 399 self::$registeredLoaders[$this->vendorDir] = $this; 400 } 303 401 } 304 402 305 403 /** 306 404 * Unregisters this instance as an autoloader. 405 * 406 * @return void 307 407 */ 308 408 public function unregister() 309 409 { 310 410 spl_autoload_unregister(array($this, 'loadClass')); 411 412 if (null !== $this->vendorDir) { 413 unset(self::$registeredLoaders[$this->vendorDir]); 414 } 311 415 } 312 416 … … 315 419 * 316 420 * @param string $class The name of the class 317 * @return bool|null True if loaded, null otherwise421 * @return true|null True if loaded, null otherwise 318 422 */ 319 423 public function loadClass($class) 320 424 { 321 425 if ($file = $this->findFile($class)) { 322 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 323 428 324 429 return true; 325 430 } 431 432 return null; 326 433 } 327 434 … … 368 475 } 369 476 477 /** 478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 481 */ 482 public static function getRegisteredLoaders() 483 { 484 return self::$registeredLoaders; 485 } 486 487 /** 488 * @param string $class 489 * @param string $ext 490 * @return string|false 491 */ 370 492 private function findFileWithExtension($class, $ext) 371 493 { … … 433 555 return false; 434 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 435 579 } 436 437 /**438 * Scope isolated include.439 *440 * Prevents access to $this/self from included files.441 */442 function includeFile($file)443 {444 include $file;445 } -
ip2location-redirection/trunk/vendor/composer/autoload_classmap.php
r2386040 r3444439 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 8 8 return array( 9 'IP2Location\\Database' => $vendorDir . '/ip2location/ip2location-php/IP2Location.php', 10 'IP2Location\\WebService' => $vendorDir . '/ip2location/ip2location-php/IP2Location.php', 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 11 10 ); -
ip2location-redirection/trunk/vendor/composer/autoload_namespaces.php
r2386040 r3444439 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
ip2location-redirection/trunk/vendor/composer/autoload_psr4.php
r2386040 r3444439 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 8 8 return array( 9 'IP2Location\\' => array($vendorDir . '/ip2location/ip2location-php/src'), 9 10 ); -
ip2location-redirection/trunk/vendor/composer/autoload_real.php
r2386040 r3444439 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 4b9a83d71f3c1c85c2d163d8335d1ad55 class ComposerAutoloaderInite0393f7122caeb6588f3264c0dea39ef 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit4b9a83d71f3c1c85c2d163d8335d1ad5', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 27 spl_autoload_unregister(array('ComposerAutoloaderInit4b9a83d71f3c1c85c2d163d8335d1ad5', 'loadClassLoader')); 25 require __DIR__ . '/platform_check.php'; 28 26 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());30 if ($useStaticLoader) {31 require_once __DIR__ . '/autoload_static.php';27 spl_autoload_register(array('ComposerAutoloaderInite0393f7122caeb6588f3264c0dea39ef', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInite0393f7122caeb6588f3264c0dea39ef', 'loadClassLoader')); 32 30 33 call_user_func(\Composer\Autoload\ComposerStaticInit4b9a83d71f3c1c85c2d163d8335d1ad5::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInite0393f7122caeb6588f3264c0dea39ef::getInitializer($loader)); 50 33 51 34 $loader->register(true); -
ip2location-redirection/trunk/vendor/composer/autoload_static.php
r2386040 r3444439 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 4b9a83d71f3c1c85c2d163d8335d1ad57 class ComposerStaticInite0393f7122caeb6588f3264c0dea39ef 8 8 { 9 public static $prefixLengthsPsr4 = array ( 10 'I' => 11 array ( 12 'IP2Location\\' => 12, 13 ), 14 ); 15 16 public static $prefixDirsPsr4 = array ( 17 'IP2Location\\' => 18 array ( 19 0 => __DIR__ . '/..' . '/ip2location/ip2location-php/src', 20 ), 21 ); 22 9 23 public static $classMap = array ( 10 'IP2Location\\Database' => __DIR__ . '/..' . '/ip2location/ip2location-php/IP2Location.php', 11 'IP2Location\\WebService' => __DIR__ . '/..' . '/ip2location/ip2location-php/IP2Location.php', 24 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 12 25 ); 13 26 … … 15 28 { 16 29 return \Closure::bind(function () use ($loader) { 17 $loader->classMap = ComposerStaticInit4b9a83d71f3c1c85c2d163d8335d1ad5::$classMap; 30 $loader->prefixLengthsPsr4 = ComposerStaticInite0393f7122caeb6588f3264c0dea39ef::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInite0393f7122caeb6588f3264c0dea39ef::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInite0393f7122caeb6588f3264c0dea39ef::$classMap; 18 33 19 34 }, null, ClassLoader::class); -
ip2location-redirection/trunk/vendor/composer/installed.json
r2387362 r3444439 1 [ 2 { 3 "name": "ip2location/ip2location-php", 4 "version": "8.2.3", 5 "version_normalized": "8.2.3.0", 6 "source": { 7 "type": "git", 8 "url": "https://github.com/chrislim2888/IP2Location-PHP-Module.git", 9 "reference": "532749399c73b664ca8b24770b40b6c479131870" 10 }, 11 "dist": { 12 "type": "zip", 13 "url": "https://api.github.com/repos/chrislim2888/IP2Location-PHP-Module/zipball/532749399c73b664ca8b24770b40b6c479131870", 14 "reference": "532749399c73b664ca8b24770b40b6c479131870", 15 "shasum": "" 16 }, 17 "time": "2020-09-23T23:04:28+00:00", 18 "type": "library", 19 "installation-source": "dist", 20 "autoload": { 21 "classmap": [ 22 "IP2Location.php" 23 ] 24 }, 25 "notification-url": "https://packagist.org/downloads/", 26 "license": [ 27 "MIT" 28 ], 29 "authors": [ 30 { 31 "name": "IP2Location", 32 "email": "support@ip2location.com", 33 "homepage": "http://www.ip2location.com" 34 } 35 ], 36 "description": "[Official Release] IP2Location PHP API to get location info from IPv4 and IPv6 address.", 37 "homepage": "http://www.ip2location.com", 38 "keywords": [ 39 "geolocation", 40 "ip2location", 41 "ip2locationlite" 42 ] 43 } 44 ] 1 { 2 "packages": [ 3 { 4 "name": "ip2location/ip2location-php", 5 "version": "9.8.1", 6 "version_normalized": "9.8.1.0", 7 "source": { 8 "type": "git", 9 "url": "https://github.com/chrislim2888/IP2Location-PHP-Module.git", 10 "reference": "e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/chrislim2888/IP2Location-PHP-Module/zipball/e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce", 15 "reference": "e18e5372cfa4b57f33d2dc8c15d24cee1ee6d1ce", 16 "shasum": "" 17 }, 18 "require": { 19 "ext-bcmath": "*", 20 "ext-curl": "*", 21 "ext-json": "*", 22 "php": ">=7.2" 23 }, 24 "require-dev": { 25 "phpunit/phpunit": "^9.5" 26 }, 27 "time": "2025-12-21T22:28:29+00:00", 28 "type": "library", 29 "installation-source": "dist", 30 "autoload": { 31 "psr-4": { 32 "IP2Location\\": "src" 33 } 34 }, 35 "notification-url": "https://packagist.org/downloads/", 36 "license": [ 37 "MIT" 38 ], 39 "authors": [ 40 { 41 "name": "IP2Location", 42 "email": "support@ip2location.com", 43 "homepage": "https://www.ip2location.com" 44 } 45 ], 46 "description": "[Official Release] IP2Location PHP API to get location info from IPv4 and IPv6 address.", 47 "homepage": "https://www.ip2location.com", 48 "keywords": [ 49 "area code", 50 "geolocation", 51 "ip geolocation", 52 "ip2location", 53 "ip2locationlite", 54 "isp", 55 "mcc", 56 "mnc", 57 "time zone", 58 "usage type", 59 "zip code" 60 ], 61 "support": { 62 "issues": "https://github.com/chrislim2888/IP2Location-PHP-Module/issues", 63 "source": "https://github.com/chrislim2888/IP2Location-PHP-Module/tree/9.8.1" 64 }, 65 "install-path": "../ip2location/ip2location-php" 66 } 67 ], 68 "dev": true, 69 "dev-package-names": [] 70 } -
ip2location-redirection/trunk/vendor/ip2location/ip2location-php/LICENSE.TXT
r2386040 r3444439 1 1 MIT License 2 2 3 Copyright (c) 20 17IP2Location.com3 Copyright (c) 2023 - 2025 IP2Location.com 4 4 5 5 Permission is hereby granted, free of charge, to any person obtaining a copy -
ip2location-redirection/trunk/vendor/ip2location/ip2location-php/README.md
r2387362 r3444439 6 6 *This is the official release maintained by IP2Location.com* 7 7 8 This PHP module provides fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, MNC, MCC, mobile brand, elevation, and usage type from IP address by using IP2Location database. This module uses a file based database available at IP2Location.com.8 This PHP module provides fast lookup of country, region, district, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, MNC, MCC, mobile brand, elevation, usage type, address type, IAB category and ASN from IP address by using IP2Location database. This module uses a file based database available at IP2Location.com. 9 9 10 10 This module can be used in many types of projects such as: … … 30 30 3. **Comprehensive Information.** There are more than 13 types of information that you can retrieve from an IP address. Please visit [IP2Location.com](https://www.ip2location.com/databases) for details. 31 31 32 # # INSTALLATION32 # Developer Documentation 33 33 34 To install this module, unzip the package and copy the following files to your web folder. 35 * IP2Location.php 36 * example.php 37 * databases/IP2LOCATION-LITE-DB1.BIN 38 39 To test this installation, please browse example.php using web browser. 40 41 ## USAGE 42 43 You can check the **example.php** file to learn more about usage. 44 45 ### Database Class 46 Below is the description of the functions available in the **Database** class. 47 48 | Function Name | Description | 49 |---|---| 50 |Constructor|Expect 2 input parameters:<ol><li>Full path of IP2Location BIN data file.</li><li>File Open Mode<ul><li> SHARED_MEMORY</li><li>MEMORY_CACHE</li><li>FILE_IO</li></ul></li></ol>For SHARED_MEMORY and MEMORY_CACHE, it will require your server to have sufficient memory to hold the BIN data, otherwise it will raise the errors during the object initialization.| 51 |getDate|Return the database's compilation date as a string of the form 'YYYY-MM-DD'| 52 |getType|Return the database's type, 1 to 24 respectively for DB1 to DB24. Please visit https://www.ip2location.com/databases for details.| 53 |getModuleVersion|Return the version of module| 54 |getDatabaseVersion|Return the version of database| 55 |lookup|Return the IP information in array. Below is the information returned:<ul><li>ipNumber</li><li>ipVersion</li><li>ipAddress</li><li>countryCode</li><li>countryName</li><li>regionName</li><li>cityName</li><li>latitude</li><li>longitude</li><li>areaCode</li><li>iddCode</li><li>weatherStationCode</li><li>weatherStationName</li><li>mcc</li><li>mnc</li><li>mobileCarrierName</li><li>usageType</li><li>elevation</li><li>netSpeed</li><li>timeZone</li><li>zipCode</li><li>domainName</li><li>isp</li></ul>You can visit [IP2Location](https://www.ip2location.com/databases/db24-ip-country-region-city-latitude-longitude-zipcode-timezone-isp-domain-netspeed-areacode-weather-mobile-elevation-usagetype) for the description of each field. Note: although the above names are not exactly matched with the names given in this link, but they are self-described.| 56 |getCidr|Return an array of the complete IP list in CIDR format of the detected row record based on the given IP address.| 57 58 59 ### WebService Class 60 Below is the description of the functions available in the **WebService** class. 61 62 | Function Name | Description | 63 | ------------- | ------------------------------------------------------------ | 64 | Constructor | Expect 3 input parameters:<ol><li>IP2Location API Key.</li><li>Package (WS1 - WS24)</li><li>Use HTTPS or HTTP</li></ol> | 65 | lookup | Return the IP information in array.<ul><li>country_code</li><li>country_name</li><li>region_name</li><li>city_name</li><li>latitude</li><li>longitude</li><li>zip_code</li><li>time_zone</li><li>isp</li><li>domain</li><li>net_speed</li><li>idd_code</li><li>area_code</li><li>weather_station_code</li><li>weather_station_name</li><li>mcc</li><li>mnc</li><li>mobile_brand</li><li>elevation</li><li>usage_type</li><li>continent<ul><li>name</li><li>code</li><li>hemisphere</li><li>translations</li></ul></li><li>country<ul><li>name</li><li>alpha3_code</li><li>numeric_code</li><li>demonym</li><li>flag</li><li>capital</li><li>total_area</li><li>population</li><li>currency<ul><li>code</li><li>name</li><li>symbol</li></ul></li><li>language<ul><li>code</li><li>name</li></ul></li><li>idd_code</li><li>tld</li><li>translations</li></ul></li><li>region<ul><li>name</li><li>code</li><li>translations</li></ul></li><li>city<ul><li>name</li><li>translations</li></ul></li><li>geotargeting<ul><li>metro</li></ul></li><li>country_groupings</li><li>time_zone_info<ul><li>olson</li><li>current_time</li><li>gmt_offset</li><li>is_dst</li><li>sunrise</li><li>sunset</li></ul></li><ul> | 66 | getCredit | Return remaining credit of the web service account. | 67 34 To learn more about installation, usage, and code examples, please visit the developer documentation at [https://ip2location-php.readthedocs.io/en/latest/index.html](https://ip2location-php.readthedocs.io/en/latest/index.html). 68 35 69 36 … … 78 45 You can also sign up for [IP2Location Web Service](https://www.ip2location.com/web-service/ip2location) to lookup by IP2Location API. 79 46 47 ## BIN DOWNLOADER SCRIPT 48 ``` 49 php ip2location_bin_download.php --token DOWNLOAD_TOKEN --file DATABASE_CODE -y 50 ``` 51 52 The command above will download the DATABASE_CODE BIN file and unzip the file into *data* folder. 53 54 | Parameters | Description | 55 |---|---| 56 |token|Download token. You can get your token at your [IP2Location Account Area](https://www.ip2location.com/account) at the Download page.| 57 |file|Database package. (DB1BIN...DB26BIN, DB1BINIPV6...DB26BINIPV6, DB1LITEBIN...DB11LITEBIN or DB1LITEBINIPV6...DB11LITEBINIPV6) You may login to your [IP2Location Account Area](https://www.ip2location.com/account) and get the package code (or download code) at the Download page. | 58 |y|Auto replace the current BIN file without acknowledgement.| 59 60 You can set the **DOWNLOAD_TOKEN** and **DATABASE_CODE** with values in the .env file (same path as *ip2location_bin_download.php*) and run the command `php ip2location_bin_download.php` for the download. 61 80 62 ## IPv4 BIN vs IPv6 BIN 81 63 * Use the IPv4 BIN file if you just need to query IPv4 addresses. … … 87 69 * [IP2Location CakePHP](https://github.com/ip2location/ip2location-cakephp) 88 70 * [IP2Location CodeIgniter](https://github.com/ip2location/codeigniter-ip2location) 71 * [IP2Location Yii](https://github.com/ip2location/ip2location-yii) 72 * [Symfony Framework](https://blog.ip2location.com/knowledge-base/geolocation-lookup-using-symfony-4-and-ip2location-bin-database/). Tutorial on the Symfony implementation. 89 73 90 74 ## COPYRIGHT AND LICENSE 91 75 92 Copyright (C) 2005-202 0by IP2Location.com76 Copyright (C) 2005-2025 by IP2Location.com 93 77 94 78 License under MIT -
ip2location-redirection/trunk/vendor/ip2location/ip2location-php/composer.json
r2387362 r3444439 1 1 { 2 "name": "ip2location/ip2location-php", 3 "description": "[Official Release] IP2Location PHP API to get location info from IPv4 and IPv6 address.", 4 "keywords": ["ip2location", "ip2locationlite", "geolocation"], 5 "homepage": "http://www.ip2location.com", 6 "type": "library", 7 "license": "MIT", 8 "autoload": { 9 "classmap": ["IP2Location.php"] 10 }, 11 "authors": [ 12 { 13 "name": "IP2Location", 14 "email": "support@ip2location.com", 15 "homepage": "http://www.ip2location.com" 16 } 17 ] 2 "name": "ip2location/ip2location-php", 3 "description": "[Official Release] IP2Location PHP API to get location info from IPv4 and IPv6 address.", 4 "keywords": ["ip2location", "ip2locationlite", "geolocation", "ip geolocation", "isp", "time zone", "mnc", "mcc", "usage type", "zip code", "area code"], 5 "homepage": "https://www.ip2location.com", 6 "type": "library", 7 "license": "MIT", 8 "authors": [ 9 { 10 "name": "IP2Location", 11 "email": "support@ip2location.com", 12 "homepage": "https://www.ip2location.com" 13 } 14 ], 15 "require-dev": { 16 "phpunit/phpunit": "^9.5" 17 }, 18 "require": { 19 "php": ">=7.2", 20 "ext-bcmath": "*", 21 "ext-curl": "*", 22 "ext-json": "*" 23 }, 24 "autoload": { 25 "psr-4": { 26 "IP2Location\\": "src" 27 } 28 } 18 29 }
Note: See TracChangeset
for help on using the changeset viewer.