Code Monkey home page Code Monkey logo

0627657319 / ip2location-php-module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrislim2888/ip2location-php-module

0.0 0.0 0.0 7.28 MB

This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.

Home Page: https://www.ip2location.com

License: MIT License

PHP 100.00%

ip2location-php-module's Introduction

IP2Location (PHP Module)

Latest Stable Version Total Downloads

This is the official release maintained by IP2Location.com

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.

This module can be used in many types of projects such as:

  1. select the geographically closest mirror
  2. analyze your web server logs to determine the countries of your visitors
  3. credit card fraud detection
  4. software export controls
  5. display native language and currency
  6. prevent password sharing and abuse of service
  7. geotargeting in advertisement

Free IP2Location LITE and commerical databases are available for download.

Monthly update is available for both IP2Location LITE and commercial database.

KEY FEATURES

  1. Support both IPv4 and IPv6 with ease. If you would like to enable IPv6 support, you just need to replace your BIN file with IPv6 version. That's it, and no code modification needed.
  2. Extensible. If you require different granularity of IP information, you can visit IP2Location.com to download the relevant BIN file, and the information will made ready for you.
  3. Comprehensive Information. There are more than 13 types of information that you can retrieve from an IP address. Please visit IP2Location.com for details.

Developer Documentation

To learn more about installation, usage, and code examples, please visit the developer documentation at https://ip2location-php.readthedocs.io/en/latest/index.html.

DEPENDENCIES

This library requires IP2Location BIN data file to function. You may download the BIN data file at

An outdated BIN database was provided in the databases folder for your testing. You are recommended to visit the above links to download the latest BIN database.

You can also sign up for IP2Location Web Service to lookup by IP2Location API.

BIN DOWNLOADER SCRIPT

php ip2location_bin_download.php --token DOWNLOAD_TOKEN --file DATABASE_CODE -y

The command above will download the DATABASE_CODE BIN file and unzip the file into data folder.

Parameters Description
token Download token. You can get your token at your IP2Location Account Area at the Download page.
file Database package. (DB1BIN...DB26BIN, DB1BINIPV6...DB26BINIPV6, DB1LITEBIN...DB11LITEBIN or DB1LITEBINIPV6...DB11LITEBINIPV6) You may login to your IP2Location Account Area and get the package code (or download code) at the Download page.
y Auto replace the current BIN file without acknowledgement.

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.

IPv4 BIN vs IPv6 BIN

  • Use the IPv4 BIN file if you just need to query IPv4 addresses.
  • Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.

OTHER FRAMEWORK LIBRARY

Below are the list of other framework library that you can install and use right away.

COPYRIGHT AND LICENSE

Copyright (C) 2005-2024 by IP2Location.com

License under MIT

ip2location-php-module's People

Contributors

chrislim2888 avatar ip2location avatar gbaquedano avatar onesvat avatar gjuric avatar zygimantas-skinkys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.