/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function logPage($page) { dbConnect(); if ($_SERVER['HTTP_REFERER'] == "") { $_SERVER['HTTP_REFERER'] = "N/A"; } mysql_query("INSERT INTO log_leiding (id, http_host, phpsessid, request_uri, page, http_referer, http_user_agent, remote_addr, date, time, source) VALUES ('', '{$_SERVER['HTTP_HOST']}', '{$_REQUEST['PHPSESSID']}', '{$_SERVER['REQUEST_URI']}', '{$page}', '{$_SERVER['HTTP_REFERER']}', '{$_SERVER['HTTP_USER_AGENT']}', '{$_SERVER['REMOTE_ADDR']}', NOW(), NOW(), '{$_SESSION[source]}')"); }