Skip to content

aashan007/ipaddr

Repository files navigation

PHP IP Logger (with Reverse Lookup)

PHP Configuration

  • Insert necessary values into vistor_config.php
  • (optional) Change locations of visitor_config.php and visitor_connect.php, but don't forget to update the require() statements in visitor_config.php and visitor_info.php
  • Use require() in your all your webpages to include the file visitor_info.php

MySQL Configuration

  • Create a database, and then create a table. The table should have the following structure:

    Name Type Default Extra
    id INT None AUTO_INCREMENT
    time timestamp CURRENT_TIMESTAMP
    ip_address varchar(50) None
    hostname text None
    cur_url text None
    pre_url text None
    xff_headers text None
  • Or use the query below:

     CREATE TABLE `DATABASE_HERE`.`TABLE_HERE` ( `id` INT NOT NULL AUTO_INCREMENT , `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `ip_address` VARCHAR(50) NOT NULL , `hostname` VARCHAR(100) NOT NULL , `cur_url` TEXT NOT NULL , `pre_url` TEXT NOT NULL , `xff_headers` TEXT NOT NULL ,'country' VARCHAR(30) NOT NULL ,'city' VARCHAR(30) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_general_ci; 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages