?
Solved

annoying referer

Posted on 2008-10-02
1
Medium Priority
?
227 Views
Last Modified: 2012-05-05
hello there,
I have seen in my awstats logs that about 120 sites from the same owner is sending traffic to my site and its not content related..
I would like to send back all his traffic.. so I can write down all his domains and have a php script that if it came from there then send it back
how can I do this?
0
Comment
Question by:XK8ER
1 Comment
 
LVL 22

Accepted Solution

by:
Ivo Stoykov earned 2000 total points
ID: 22631461
Hello XK8ER

Here is a simple script that might give you an idea

HTH
I

if(ip2long($_SERVER['REMOTE_ADDR']) >= ip2long('XXX.XXX.XXX.XXX') && ip2long($_SERVER['REMOTE_ADDR']) <= ip2long('XXX.XXX.XXX.XXX'))
{
// it comes from forbidden range and must be cut off
  exit();
}

Open in new window

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question