<?php
include("connect.php");
if (!isset($_GET['reload'])){
if (isset($_COOKIE['screen'])) {
$screen = $_COOKIE['screen'];
$cookend = true;
} else {
?><meta HTTP-EQUIV="REFRESH" content="0; url="<?=$_SERVER['PHP_SELF'] . 'reload=1';?>""><?php
}
}
$date = date("Y-m-d H:i:s");
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$ip = $_SERVER['REMOTE_ADDR'];
$httpaccess = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$name = $_COOKIE['name'];
$sql = "INSERT INTO `info` ( `Time` , `IP` , `Useragent` , `Cookieson` , `Screen` , `HTTPAcceptL` , `hostname` , `name` , `empty2` )
VALUES (
'$date' , '$ip' , '$_SERVER[HTTP_USER_AGENT]' , '$cookend' , '$screen' , '$httpaccess' , '$hostname' , '$name' , ''
) ;
";
$result = mysql_query($sql);
if(!$result)
{
//something went wrong, display the error
echo 'Something went wrong. Please try again later.';
//echo mysql_error(); //debugging purposes, uncomment when needed
}
?>
</head>
</html>