// 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; }
?>
Vision Tool Availability and Forms
Lions International District 27-A2 Vision Tool Calendar Page
Lions International District 27-A2
Where there's a need, there's a LION
Vision Screening Page
All your resources are here for your vision screening program.
Schools/Nurses, please check for an open date and send your request by clicking the 'Schedule/Request Button Below' and completing the form. Our District Vision Chair will reply to you as soon as possible.
Vision Screening Forms
Fill out this form to reserve vision screening tool(s).
Visit the Wisconsin Lions Foundation website for Vision Screening resources.
Use this form for vision screening registration.
Use this form to record your vision screening work and send to District.
Return to Website Navigation Menu