// file: logger.php
// writes a record to a YY-MM file to record visits
// author: Kase
// update: 1/3/2019 added getbro
date_default_timezone_set('America/Chicago');
$date = date('m/d/Y h:i:s a', time());
$datename = date('y-m', time());
$File = 'logs/'.$datename.".txt";
$debug = 0; // 1=TRUE
// ----------------- the below does not need to change
$url = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"];
$url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : "";
$url .= $_SERVER["REQUEST_URI"];
str_replace(array('http://','https://'), '', $url);
str_replace(array('HTTP://','HTTPS://'), '', $url);
$ua = strtolower($agent ? $agent : $_SERVER['HTTP_USER_AGENT']);
$dvc = 'BOT';
if ((stripos($ua,'android')!==false)) { $dvc = 'Android'; }
if ((stripos($ua,'iphone')!==false)) { $dvc = 'iPhone'; }
if ((stripos($ua,'ipad')!==false)) { $dvc = 'iPad'; }
if ((stripos($ua,'windows nt 5.1')!==false)) { $dvc = 'XP'; }
if ((stripos($ua,'windows nt 6.1')!==false)) { $dvc = 'Win7'; }
if ((stripos($ua,'windows nt 6.3')!==false)) { $dvc = 'Win8'; }
if ((stripos($ua,'windows nt 10')!==false)) { $dvc = 'Win10'; }
if ((stripos($ua,'linux x86')!==false)) { $dvc = 'Linux'; }
if ((stripos($ua,'macintosh')!==false)) { $dvc = 'Macintosh'; }
// ---------------------- get browser data
include('getbro.php');
$ua=getBrowser();
$device = $ua['name'].' '.$ua['version'].' '.$ua['platform'].' '.$dvc;
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ipaddress=$_SERVER['HTTP_CLIENT_IP']; }
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{ // check ip is pass from proxy
$ipaddress=$_SERVER['HTTP_X_FORWARDED_FOR']; }
else { // use the basic one
$ipaddress=$_SERVER['REMOTE_ADDR']; }
// $dumpstr = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=".$_SERVER["REMOTE_ADDR"]));
$region = $dumpstr["geoplugin_region"];
$countryName = $dumpstr["geoplugin_countryName"];
$latitude = $dumpstr["geoplugin_latitude"];
$longitude = $dumpstr["geoplugin_longitude"];
$regionName = $dumpstr["geoplugin_regionName"];
$Handle = fopen($File, 'a');
$Data = $date.",".
$ipaddress.",".
$url.",".
$region.",".
$regionName.",".
$countryName.",".
$latitude.",".
$longitude.",".
$device."\r\n";
fwrite($Handle, $Data);
fclose($Handle);
// ------------------------------------------- last visitor
$myfile = fopen("lastvisit.txt", "w") or die("Unable to write lastvisit");
$txt = $ipaddress.' '.$region.' '.$countryName;
fwrite($myfile, $txt);
fclose($myfile);
if ($debug=='1') { echo $Data; }
?>
Contact Us
Lions International District 27-A2 Club Contact Page
Lions International District 27-A2
Where there's a need, there's a LION
Little Known Facts
Lions Clubs are men and women of all ages, from all walks of life, united by the simple ideal of service to their community.
Lions membership is for the whole family. We have 3 Lion Cub programs divided into three age groups: 3 and under, 4 to 7, and 8 to 12 and our Leos program for young persons age 12-18.
100% of the funds Lions raise go back in to the community. Not one cent is used for club administration. Yes, 100% back!
Wisconsin Lions Camp for handicapped persons serves over 1,300 campers each summer; all free of charge!
In 1924, Lions obtained its greatest charter to be Helen Keller's “Knights of the Blind”.