Giter Club home page Giter Club logo

php-user_info's Introduction

php-user_info

PHP class to get information about the website visitor (IP, reverse DNS, referer, OS, etc...)

Installation

Use Composer to install the library:

composer require olegkoval/php-user-info

Usage

  1. Include file with UserInfo class in your project:
require_once('<path_to_folder_which_contain_this_file>/UserInfo.php')
  1. Create UserInfo object:
$UserInfo = new UserInfo();
  1. Call methods to get info about the website visitor:
  • $UserInfo->getIP() - get IP of visitor
  • $UserInfo->getReverseDNS() - get Reverse DNS of visitor
  • $UserInfo->getCurrentURL() - get current URL
  • $UserInfo->getRefererURL() - get Referer URL
  • $UserInfo->getDevice() - get Device type (PC/iPad/iPhone/etc...) of visitor
  • $UserInfo->getOS() - get OS of visitor
  • $UserInfo->getBrowser() - get Browser type of visitor
  • $UserInfo->getLanguage() - get Browser Language of visitor
  • $UserInfo->getCountryCode() - get Country Code of visitor
  • $UserInfo->getCountryName() - get Country Name of visitor
  • $UserInfo->getRegionCode() - get Region Code of visitor
  • $UserInfo->getRegionName() - get Region Name of visitor
  • $UserInfo->getCity() - get City of visitor
  • $UserInfo->getZipcode() - get Zipcode of visitor
  • $UserInfo->getLatitude() - get Latitude of visitor
  • $UserInfo->getLongitude() - get Longitude of visitor
  • $UserInfo->isProxy() - check if connection was through proxy

Requirements

  1. Browscap
    http://www.php.net/manual/en/misc.configuration.php#ini.browscap

  2. cURL
    http://php.net/manual/en/book.curl.php

Creator

Oleg Koval
@olegkoval

php-user_info's People

Contributors

olegkoval avatar olegkovalsvitla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-user_info's Issues

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.