Posted By

Meestercor on 05/22/08


Tagged

textmate log


Versions (?)

Log page to databse


 / Published in: Other
 

  1. function logPage($page) {
  2.  
  3. dbConnect();
  4.  
  5. if ($_SERVER['HTTP_REFERER'] == "") {
  6.  
  7. $_SERVER['HTTP_REFERER'] = "N/A";
  8.  
  9. }
  10.  
  11. 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]}')");
  12. }

Report this snippet  

You need to login to post a comment.