olegkoval / php-user-info
Get information about user which visited page of your website
Installs: 1 800
Dependents: 0
Suggesters: 0
Security: 0
Stars: 29
Watchers: 4
Forks: 21
Open Issues: 0
Requires
- php: >=5.0.0
This package is auto-updated.
Last update: 2024-10-13 04:45:53 UTC
README
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
- Include file with UserInfo class in your project:
require_once('<path_to_folder_which_contain_this_file>/UserInfo.php')
- Create UserInfo object:
$UserInfo = new UserInfo();
- 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