LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-26-2003, 03:59 PM   #1
dave4545
Member
 
Registered: Oct 2002
Distribution: Redhat Linux 7.0 Apache/1.3.27 PHP Version 4.3.1 server api Apache
Posts: 46

Rep: Reputation: 15
excluding an I.P. or domain with php


Hi.

I have a stats program that shows referrals. Even my own. Is there a short routine I can use to exclude an ip address and domain name so it doesn't showup?


If I had the routine I could place it in a place that would stop it from counting my domain.

Any idea?


Basically something that will allow me a wild card and exclude more than one domain or I.P.

I would really appreciate any suggestions or directions you might offer.
Thanks.
Dave.
 
Old 11-26-2003, 04:07 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could probably just set a conditional rule so that your domain isn't logged. See:
http://httpd.apache.org/docs/logs.html#conditional
 
Old 11-26-2003, 11:41 PM   #3
dave4545
Member
 
Registered: Oct 2002
Distribution: Redhat Linux 7.0 Apache/1.3.27 PHP Version 4.3.1 server api Apache
Posts: 46

Original Poster
Rep: Reputation: 15
Is there a way to do this with php?

Thanks.
Dave.
 
Old 11-27-2003, 12:26 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
In php? Do you mean you are writing your own script to parse the log? Take a look at the "preg_match" function ad run a regular expression match.
 
Old 11-27-2003, 10:51 PM   #5
dave4545
Member
 
Registered: Oct 2002
Distribution: Redhat Linux 7.0 Apache/1.3.27 PHP Version 4.3.1 server api Apache
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks Dave.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
excluding directories from commands David the H. Linux - General 5 04-06-2009 03:21 PM
Excluding a directory when copying Woodsman Slackware 2 10-30-2005 06:25 PM
Excluding a file when using pax tobycatlin Linux - General 9 04-28-2005 11:13 AM
PHP: Best way to preserve session data when leaving a domain? Locura Programming 0 03-13-2004 03:40 PM
tar and excluding files murshed Linux - Newbie 7 03-15-2003 02:32 PM


All times are GMT -5. The time now is 01:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration