Forum Moderators: coopster

Message Too Old, No Replies

automatic email notification of a specific IP visit

email alert sent when a particular IP range visits

         

revrob

10:05 pm on Aug 21, 2010 (gmt 0)

10+ Year Member



I would like to detect (but not redirect) visits from a particular IP range(s) and be sent an email to notify me of their visit. This is to be invisible to the visitor. I wish to check on visits from specific unwanted corporate addresses who have been told not to visit my site and do so in contravention of Terms and Conditions, letters, and robots.txt.

I already use some slightly modified php scripts from here,
[seven-3-five.blogspot.com...]
and .htaccess redirects to redirect detect specific IP ranges, to a page with an email notification script, but is it possible to do something that would send me emails including the IP and referrer of the visitor, without me having to direct the visitor to a specific page with a script on it?

I am not familiar with php syntax so would value a simple answer please!

All help gratefully received.

Frank_Rizzo

11:24 am on Aug 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello rob. Would this be to detect Kent, Emma or Charles? :-)

There are two ways to do this.

1. Live PHP IP checking
2. Historic log file checking

Which version will depend on if you want to stop the visitor in its tracks, or if you want to let it run loose and garner evidence later.

For 1. the seven-3-five script should work fine but it will block the IP on the first hit, and you have to include the script on every page of your site.

For 2. you can use a command line tool to filter for the IP, count how many pages it viewed, their dates and times and send one email. This can be set up to run hourly or daily.

revrob

12:24 pm on Aug 22, 2010 (gmt 0)

10+ Year Member



good guess Frank - we meet again! Charley's me darling this time - discuss that aspect further by pm if necessary - or you may well have my email still on file - I have yours.

But this bit we can discuss publicly for everyone's benefit.
number one is not a problem - I do that already by .htaccess redirecting IP ranges to a php page that sends me an email and gives them specific tailored content (variations on "go away"), but this particular visitor I don't want to ban - just log for invoicing purposes. At the moment I just redirect them but I'd like a tool where that isn't necessary so number 2 seems the one "historic log file checking" - in essence I am having to do that manually every day anyway.
But an automatic tool could be particularly useful for sites with more traffic that need to log (and invoice) substantial numbers of visits to their websites that contravene already clearly communicated terms and conditions. I already have a good manual system in place.

So tell me more about historic log checking please.

Any webmaster (particularly UK) interested in asserting their rights against covert user tracking by ISP's that abuses their website rights - do get in touch with me, I have a self-financing solution.