Skip to content

Simple php script to keep track of dynamic IPs, using mysql storage.

License

Notifications You must be signed in to change notification settings

serpi90/IP-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP tracker

Simple php script to keep track of dynamic IPs, using mysql storage.

Usage

POST index.php?site=mysite stores the visible ip of the client accessing the script, and stores it under mysite.

GET index.php?site=mysite fetches the last known ip for mysite. If no address is known nothing is returned.

Configuration

Rename config-example.php to config.php and configure the variables defined there.

$mysql_host = "";
$mysql_database = "";
$mysql_user = "";
$mysql_password = "";

The database must have a table create with the following command.

CREATE TABLE `ip` (
 `site` VARCHAR(256) CHARACTER SET ascii NOT NULL,
 `ip` BINARY(16) NOT NULL,
  PRIMARY KEY (`site`)
);

About

Simple php script to keep track of dynamic IPs, using mysql storage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages