Coder Social home page Coder Social logo

ipaddr's Introduction

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; 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.