$value) { global $$name; $$name = $value;} foreach($_GET as $name => $value) { global $$name; $$name = $value;} $HTTP_REFERER = getenv("HTTP_REFERER"); $HTTP_USER_AGENT = getenv("HTTP_USER_AGENT"); if (!isset($offset)) { $offset = 0; } if (!isset($limit)) { $limit = 50; } mysql_connect('localhost', 'rex', 'dairyfarm'); mysql_select_db('rex'); $result = mysql_query("select count(*) from linklog"); list($total) = mysql_fetch_row($result); // if ( preg_match("/googlebot/i", $HTTP_REFERER) ) { $all = 1; } if ( preg_match("/googlebot/i", $HTTP_USER_AGENT) ) { $all = 1; } if ( isset($all) ) { $offset = 0; $limit = $total; } if ( isset($redirect) ) { $result = mysql_query("select url from linklog where id = $redirect"); list($url) = mysql_fetch_row($result); if ( $url ) { # mysql_query("update linklog set hitcount header("Location: $url"); exit; } } if ( isset($search) ) { $string = $search; $string = preg_replace('/\s+$/', "", $string); $string = preg_replace('/^\s+/', "", $string); $string = preg_replace('/\s+/', "|", $string); $string = mysql_escape_string($string); # echo "
$string
"; $result = mysql_query("select id,date_format(entered,'%c-%d-%Y: '), url, title, remark from linklog where title rlike '$string' or remark rlike '$string' order by entered desc "); } else { $result = mysql_query("select id,date_format(entered,'%c-%d-%Y: '), url, title, remark from linklog order by entered desc limit $offset, $limit"); } ?> Rex's Link Log

This is a log of the urls I visit every day. Not all of them, just the ones I take the time to enter into this form.

">