PHP Classes

PHP Get Visitor Info: Get visitor information and store in a database

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 1,346 All time: 2,882 This week: 36Up
Version License PHP version Categories
get-visitor-info 2Free For Educatio...5.0PHP 5, User Management, Web services, G..., L...
Description 

Author

This class can get visitor information and store in a database.

It can retrieve several details about the current page visitor from it IP address and other request headers.

The retrieved information is stored in a MySQL database table.

Currently it record the user computer operating system, browser, IP address, country, city, geographical coordinates, the internet service provider or the organization using the ip-api.com Web services.

The stored data can be associated to a given server domain address.

Picture of Dragan Zlatkovski
  Performance   Level  
Name: Dragan Zlatkovski <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 1975279 in United States United States
Week rank: 206 Up24 in United States United States Up

Recommendations

Google Map script with PHP
Google Map script with PHP

What is the best PHP localization visitor country class?
Localization visitor country with PHP

What is the best PHP visitor location class?
Find a visitor IP address longitude and latitude

Web based Tracking System
Tracking System

Example

<?php
include('Visitors.php');
$info=new Visitors();
$info->setSubdomain("www.draganzlatkovski.com");
$info->getVisitorInfo($_SERVER['HTTP_USER_AGENT']);
$info->insertInfo();
?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="Dragan Zlatkovski">

</head>

<body>

</body>
</html>


Screenshots (3)  
  • GoogleMapSnip
  • Snip1
  • Snip2
  Files folder image Files (9)  
File Role Description
Accessible without login Plain text file database.sql Data database table
Accessible without login Plain text file example2.php Example represent data in html table
Accessible without login Plain text file GoogleMap.php Example Google map with marked locations of users who accessed the server. The map provides the ability to select periods for review and displays information in a pop window.
Accessible without login Plain text file index.php Example example
Plain text file Visitors.php Class Class Visitors
Plain text file VisitorsCon.php Class Database connection class

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  
 0%
Total:1,346
This week:0
All time:2,882
This week:36Up
User Ratings User Comments (1)
 All time
Utility:96%StarStarStarStarStar
Consistency:89%StarStarStarStarStar
Documentation:-
Examples:96%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:481
 
Good one
9 years ago (Shanthamurthy G S)
52%StarStarStar