• Your shopping cart is empty!

IP2Location™ Download Client

Automate Database Download

This is a command line script to download IP2Location™ database from the server. Subscribers can use this script to automate the download process without visiting the download area through browser.

We update IP2Location databases on the first day of the calendar month. Please download the database once a month during a random day from the first week of calendar month to avoid network congestion.

Parameters
package Database package. (DB1...DB24, DB1BIN...DB24BIN, DB1IPV6...DB24IPV6, DB1BINIPV6...DB24BINIPV6, PX1...PX4 or PX1BIN...PX4BIN)
You may login to your account area and get the package code (or download code) at the Download page.
token Download token. You can get your token at your IP2Location Account Area at the Download page.
output Output file name. (Optional)
help Display help file.

Syntax (Linux)

./download.pl -package DB1 -token DOWNLOAD_TOKEN

Syntax (Windows)

download.exe -package DB1 -token DOWNLOAD_TOKEN

Installation

Linux

First save the download.pl to your installation directory. Make the script executable and run the script under the installation directory:
chmod 755 download.pl

Windows

First save the download.pl to your installation directory. Open a command line prompt and change directory to your installation directory.
perl download.pl ...
Note: For Windows users, you can use the download.exe to replace the download.pl to skip the Perl interpreter installation requirements.

Other Applications

You can also automate the download process using common HTTP applications such as Wget or cURL.

Wget

wget "https://www.ip2location.com/download?token={DOWNLOAD_TOKEN}&file={DATABASE_CODE} --output-document={LOCAL_FILE_NAME}

cURL

curl -o {LOCAL_FILE_NAME} "https://www.ip2location.com/download?token={DOWNLOAD_TOKEN}&file={DATABASE_CODE}"

Automate Download using Script

You can also automate the entire download, unzipping and loading of IP2Location data into database using bash or shell script.