PHP Classes

File: implementation.php

Recommend this page to a friend!
  Classes of azizny   User Info & GeoIP   implementation.php   Download  
File: implementation.php
Role: Example script
Content type: text/plain
Description: Implementation
Class: User Info & GeoIP
Get information about the current user browser
Author: By
Last change:
Date: 15 years ago
Size: 1,923 bytes


Class file image Download
Released by, under the GPL License, a
copy of it should be attached to the zip file, or
you can view it on

user info class implementation


$userInfo = new getUserInfo();

/* Load System */

/* User Browser */
echo 'Browser: '.$userInfo->getBrowser();

/* Operating System */
echo '<br />System: '.$userInfo->getSystem();

/* User IP */
echo '<br />IP: '.$userInfo->getIP();

/* Get System Language */
list($languageCode,$languageName) = $userInfo->getLanguage();
'<br />Language Code: '.$languageCode;
'<br />Language Name: '.$languageName;

/* User referral */
echo '<br />User Referreal URL: '.$userInfo->getReferer();

/* Is Referral a search engine? */
echo '<br />User Referral Search Engine: '.$userInfo->getEngine();

Custom Checks - May Require Page Reload on some Servers
Uses Cookies to transfer variables to PHP Engine

/* Load Cookies (Used for javascript/flash checking) */
$cookie = $userInfo->checkJavaFlashCookie();

/* Check for Javascript */
if($cookie == NULL){ echo '<br />Javascript Disabled';}else{ echo '<br />Javascript Enabled';}

/* Check for Flash */
switch ($cookie)
true: echo '<br />Flash Enabled';break;
false: echo '<br />Flash Disabled';break;

/* Check for Speed */
$speed = $userInfo->getSpeed();
'<br />Speed Kpbs: '.$speed;

Get Country - Requires Database/Installtion.
Download the CSV file, extract it to the helper.folder
Run helper.folder/installDatabase.php
Do the same whenever you want to update the database
//echo '<br />Country: '.$userInfo->getCountry();