Content last modified Tuesday 24 August 2021
hop to #bottom
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Disable logging for your home IP.

I got sick of seeing my home IP address in the logs (usually more of them than anything else). Changed a couple of lines in textpattern/publish/log.php and now my logs almost never change.

Wrap lines 37, 38, 39 in another if/then like this:

if ($out['host'] != "[enter your IP address here]"){
  if ($r=='refer') {
    if (trim($out['ref']) != "") { insert_logit($out); }
  } else insert_logit($out);

Now assuming you have a static IP address at home (like my cable modem which is allegedly DHCP but hasn’t changed in over a year) then you will never see yourself in your logs again.

Article Request Count:
Posted here:
05 Jun 2005

You know you want to visit the Archives.
Published with Textpattern