IP2Location™ Download Client

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, DB2...DB24, DB1BIN, DB2BIN...DB24BIN, or PX1)
You may login to your account area and get the package code (or, download code) at Download page.
login Subscriber login name.
password Subscriber password.
output Output file name. (Optional)
help Display help file.

Syntax (Linux):

./download.pl -package DB1 -login mylogin -password mypassword


Syntax (Windows):
download.exe -package DB1 -login mylogin -password mypassword

 

Installation

Linux Setup

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 Setup

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 the common HTTP applications such as wget or curl.

wget

wget "http://www.ip2location.com/download?productcode=<product>&login=<login>&password=<password>" --output-document=<local_file_name>

 

curl

curl -o <local_file_name> "http://www.ip2location.com/download?productcode=<product>&login=<login>&password=<password>"

 

Automate the data downloading and database loading using script

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