LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   excluding an I.P. or domain with php (https://www.linuxquestions.org/questions/programming-9/excluding-an-i-p-or-domain-with-php-120242/)

dave4545 11-26-2003 03:59 PM

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.

david_ross 11-26-2003 04:07 PM

You could probably just set a conditional rule so that your domain isn't logged. See:
http://httpd.apache.org/docs/logs.html#conditional

dave4545 11-26-2003 11:41 PM

Is there a way to do this with php?

Thanks.
Dave.

david_ross 11-27-2003 12:26 PM

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.

dave4545 11-27-2003 10:51 PM

Thanks Dave.


All times are GMT -5. The time now is 06:24 PM.