PHP Classes

PHP Visitor Information Tracking System: Get the geographic location of a given IP address

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 139 All time: 9,225 This week: 89Up
Version License PHP version Categories
php_visitor_tracking 1.0.0BSD License5HTTP, PHP 5, User Management, Web ser..., G...
Description 

Author

This package can get the geographic location of a given IP address.

It can take as a parameter a given IP address that can be of the current user accessing the Web site.

The class returns the geographic location details of that user using the MaxMind GeoIP database library.

It returns details like the user browser, platform, date, time, country, state, and town.

Picture of chrys ugwu
  Performance   Level  
Name: chrys ugwu <contact>
Classes: 16 packages by
Country: Nigeria Nigeria
Age: 31
All time rank: 16807 in Nigeria Nigeria
Week rank: 187 Up7 in Nigeria Nigeria Equal
Innovation award
Innovation award
Nominee: 4x

Example

<?php



include 'src/Stalk.php';

$stalk = Stalk::ip('99.75.13.122');

var_dump($stalk->city . ' ' . $stalk->country_name);


Details

This project is no longer being maintained, please use Instead

PHP Visitors Tracker Documentation

99% accurate visitors tracking system.

USAGE

$stalk = new Stalk;

$stalk->ip; //outputs clients IP address

$stalk->browser->name; //outputs clients Browser name
$stalk->browser->version; //outputs clients Browser version
$stalk->browser->OS; //outputs clients Operating system

$stalk->country_code; //outputs clients country code
$stalk->country_code3; //outputs clients full country code
$stalk->country_name; //outputs clients country name
$stalk->region; //outputs clients region
$stalk->state; //outputs clients full region
$stalk->city; //outputs clients city
$stalk->postal_code; //outputs clients postal code
$stalk->latitude; //outputs clients latitude
$stalk->longitude; //outputs clients longitude
$stalk->area_code; //outputs clients area code
$stalk->dma_code; //outputs clients dma code
$stalk->metro_code; //outputs clients metro code
$stalk->continent_code; //outputs continent code

Change Log v1.01

- The get, ip and browser method was remove. - Public variables can no longer be accessed statically. eg: $stalk->city as Stalk::city() - Stalk can now be initialized as follow: - Implicit $stalk = new Stalk; - Explicit $stalk = new Stalk('11.22.33.444); or $stalk = Stalk::ip('11.22.33.444);


  Files folder image Files (4)  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Plain text file index.php Example Example script
Plain text file README.md Doc. Documentation

  Files folder image Files (4)  /  src  
File Role Description
Files folder imagelib (1 file)
  Plain text file Stalk.php Class Class source

  Files folder image Files (4)  /  src  /  lib  
File Role Description
  Plain text file geoip.inc Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:139
This week:0
All time:9,225
This week:89Up