Download the PHP package ip2location/ip2location-csv-converter without Composer

On this page you can find all versions of the php package ip2location/ip2location-csv-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ip2location-csv-converter

IP2Location CSV Converter

Note: For a more efficient and faster conversion process, we recommend using the IP2Location Python CSV Converter

This PHP script converts IP2Location CSV data file, that contains the IP address in numeric notation, into dot-decimal notation (such as x.x.x.x) or CIDR notation (x.x.x.x/24). It supports both the IP2Location commercial edition, DB1 to DB24 database and also the free edition, IP2Location LITE database. In addition to this, this converter can also be used to convert any CSV file that contains the IP number (the numeric notation).

You can download the IP2Location CSV file at the below links:
IP2Location Commercial Database
IP2Location LITE Database

Please do not use this script to convert IP2Location BIN data file. It only support the CSV format, not the binary format.

Installation

Please install this script using composer.

After that, please copy the php script into the root directory of composer (the folder contains the composer.json and composer.lock files)

Usage

Parameters

Parameter Description
-range IP numbers will be converted into the first IP address and last IP address in the range.
-cidr IP numbers will be converted into CIDR format.
-hex IP numbers will be converted into hexadecimal format. (auto padding)
-hex4 IP numbers will be converted into hexadecimal format. (pad IPv4)
-hex6 IP numbers will be converted into hexadecimal format. (pad IPv6)
-replace The IP numbers in will be replaced to the selected format.
-append The converted format will be appended after the IP numbers field.

Example:

Sample Input
Convert into range with replace option:

Command:

Output:

Convert into CIDR with replace option:

Command:

Output:

Convert into hexadecimal with replace option:

Command:

Output:

Convert into range with append option:

Command:

Output:

Convert into CIDR with append option:

Command:

Output:

Custom Input File

You can use this converter for a custom input file provided the input is in CSV format, with the first and second field contain the ip from and ip to information in numeric format.

Support

URL: https://www.ip2location.com


All versions of ip2location-csv-converter with dependencies

PHP Build Version
Package Version
Requires mlocati/ip-lib Version ^1
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ip2location/ip2location-csv-converter contains the following files

Loading the files please wait ....