marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Ignore your own IP address for logging purposes

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Ignore your own IP address for logging purposes »
Welcome, Guest. Please Login or Register.
12/16/17 at 20:39:07
Home Help Search Login Register
   marty.net message board
   About cpshop
   Tutorials
   Ignore your own IP address for logging purposes
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Ignore your own IP address for logging purposes  (Read 2098 times)
James
Green Dragon
*

Posts: 9



Go Scots!
   

E-Mail
Ignore your own IP address for logging purposes
« on: 03/25/04 at 15:12:20 »
Reply with quote Modify message

Hey, I'm no master coder like Mr. M here, but here's what you can do so that cpshop ignores your IP which distorts your logs. Essentially at the beginning of the logging function, we're going to check to make sure that the ip address doesn't match your own. If it doesn't, proceed normally, if it does, skip the whole function.

Open cpdata.lib and search for:

sub log {

Right below this line, add the following, replacing xxx.xxx.xxx.xxx with your own ip address:

unless ($ENV{'REMOTE_ADDR'}=='xxx.xxx.xxx.xxx') {

Scroll down until you find the "sub makehome {" line.

Above that line, add a closing curly bracket "}"

That's it...
Logged
James
Green Dragon
*

Posts: 9



Go Scots!
   

E-Mail
Re: Ignore your own IP address for logging purpose
« Reply #1 on: 03/25/04 at 16:08:57 »
Reply with quote Modify message

oops, the ip address should be enclosed in quotation marks as in "xxx" rather than 'xxx'!
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.