Warning: Adult Content
By clicking 'Enter' you agree to
the following conditions:
1. I do not find nudity or sexually explicit
pictures to be objectionable or offensive.
2. It is not illegal for me to view such material.
3. I am 18 years of age or older.
" . mysql_error());
mysql_select_db($dbname, $link_id);
//we are connected
//check to see if logging is on
$result = mysql_query("SELECT * FROM logging");
if (!$result) die("");
$rows = mysql_num_rows($result);
if (!$rows) die("");
$row = mysql_fetch_row($result);
$logging = $row[0];
if ($logging=="OFF") die("");
//get variables
$ip=getenv(REMOTE_ADDR);
//use following for html pages
$page=$PHP_SELF;
$ref=$HTTP_REFERER;
$site="Bondage Lesson";
$day=date("l");
$date=date("Ymd");
$time=date("H:i:s");
//construct tablename
$tablename = 'hits_' . $date . '_' . $day;
//echo ("Constructed tablename: " . $tablename);
//echo(nl2br("\n"));
mysql_query("CREATE TABLE if not exists $tablename (site varchar(40) NOT NULL, page varchar(30) NOT NULL, ref varchar(30), ip varchar(15), time varchar(8))") or die("");
mysql_query("INSERT INTO $tablename (site, page, ref, ip, time) VALUES ('$site', '$page', '$ref', '$ip', '$time')") or die("");
mysql_close();
?>