PHP Classes

PHP User Information Class: Get details of the user accessing the current page

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 227 This week: 1All time: 8,181 This week: 560Up
Version License PHP version Categories
php-userinfo-class 1.0.5MIT/X Consortium ...5HTTP, PHP 5, User Management
Description 

Author

This class can get details of the user accessing the current page.

It checks the current request variable values to retrieve relevant information about the user accessing the page that is served by the current script. Currently it can retrieve:

- Get user computer IP address and operating system name and version
- Get user browser name and version

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84611 in Pakistan Pakistan
Week rank: 51 Up3 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'Classes/UserInfo.php';

$info = new UserInfo();

$osName = $info->operatingSystem();
$osVersion = $info->osVersion();
$browserName = $info->browser()['browser'];
$browserVersion = $info->browserVersion();
$ip = $info->ip();
$isMobile = $info->isMobile();

$data = [
   
'Operating System Name' => $osName,
   
'Operating System Version' => $osVersion,
   
'Browser Name' => $browserName,
   
'Browser Version' => $browserVersion,
   
'Ip address' => $ip,
   
'Is Mobile' => $isMobile,
];
var_dump($data);


Details

PHP UserInfo Class

PHP UserInfo Class

Feature

- Get user ip. - Get user Browser Name. - Get user Browser Version. - Get user Operating System Name. - Get user Operating System Version. - Check is user from mobile.


  Files folder image Files  
File Role Description
Files folder imageClasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENCE Lic. License text
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  Classes  
File Role Description
  Plain text file UserInfo.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:227
This week:1
All time:8,181
This week:560Up