- A web server with php and mysql
- Country flags, somewhere on your server (available on the phpTrafficA homepage),
- to download the most recent version of phpTrafficA at the the phpTrafficA homepage
First, you'll have to install ip2c, a script that determines to which country an IP address belongs:
- Download this archive.
- Open the archive, you'll have a directory called
Ip2c/
with all you need. - Transfer the whole
Ip2c/
folder to your server.
Once you installed ip2c, open the phpTrafficA archive. It consists of
- a file called
funcIp2c.php
, - a file called
count.php
, - a folder called
Php
with the actual source code of the program.
To install:
- Create a folder for phpTrafficA on your server (
YOUR_FOLDER
), - Make sure that the PHP scripts have write access to this folder (this can be done with your ftp program)
- modify
Php/config_sql.php
with your login, password and base name for mySQL server connection, - modify
Php/config.php
with- the correct path to the
Ip2c
folder relative toYOUR_FOLDER/
- the correct path to the folder with country flags relative to
YOUR_FOLDER/
- the extension of your country flags images (png, gif...)
- the correct path to the
- transfer the content of the
Php
folder to the server, in the folder you created - edit variable
$path
in the filecount.php
, with the path from you home directory to the folderYOUR_FOLDER
- transfer the file
count.php
to your home directory, - open the file
YOUR_FOLDER/install.php
in a web-browser and follow the instructions, - secure
YOUR_FOLDER
with a.htaccess
or something similar.
Additional configuration:
- If you already have ip2c and did not install the version provided here, transfer the file
funcIp2c.php
to theIp2c
folder on the server.