Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 04:51 am EST

Geeklog Forums

How Do I Stop "Top Referrer" Spam?


Status: offline

winnerdk

Forum User
Full Member
Registered: 04/24/05
Posts: 339
Location:Panama City, Republic of Panama
Now in my "Who's Online" block some porn sites are apparently hitting my site a couple of times just to appear in the "top referrer" block. Just them names of some of the guys what are appearing there are enough to scare off some advertisers.

I tried to send an example of what's happening, and I got a "spam detected, post deleted" message. Just hit the website at www.panama-guide.com and you'll see what I mean.

What's the best way to stop this? Thanks.

Don
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
As far as I remember there was a hint somewhere not to display the "who is online block" to non logged in users.

Post by me here and at gllabs.org also got deleted, there is something wrong with spam-x I believe. I hate it anyway, it makes more problems than it helps.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can't stop referrer spam (other than by taking down your site). Simply don't display the referrers, at least not to anonymous users. I thought everbody stopped doing that years ago anyway (at least that's what I've been saying in my webspam presentation :wink:

(And ignore Markus' ramblings about Spam-X - it has nothing to do with referrer spam anyway)

bye, Dirk
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298

(And ignore Markus' ramblings about Spam-X - it has nothing to do with referrer spam anyway)
bye, Dirk[/p]


No it got something to do with his side sentence:
I tried to send an example of what's happening, and I got a "spam detected, post deleted" message.


As I said more people than me have problems with Spam-x. It should not filter the posts of logged in users.
 Quote

Status: offline

winnerdk

Forum User
Full Member
Registered: 04/24/05
Posts: 339
Location:Panama City, Republic of Panama
OK, thanks. I just took it down for anonymous users - fastest and easiest fix.

Don
http://www.panama-guide.com
 Quote

Status: offline

winnerdk

Forum User
Full Member
Registered: 04/24/05
Posts: 339
Location:Panama City, Republic of Panama
Quote by: 1000ideen


(And ignore Markus' ramblings about Spam-X - it has nothing to do with referrer spam anyway)
bye, Dirk



No it got something to do with his side sentence:
I tried to send an example of what's happening, and I got a "spam detected, post deleted" message.


As I said more people than me have problems with Spam-x. It should not filter the posts of logged in users.[/p][/QUOTE]

Actually, the problem occurred when I tried to copy and past the entire list of referring websites, and about three or four of them were from porno or spamming sites. So I guess that Spam-x picked up on the string of URL's and gagged on it. Whatever. What matters is that I was able to ask my question and to get an answer. Thanks again.

Don
http://www.panama-guide.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: winnerdk

Actually, the problem occurred when I tried to copy and past the entire list of referring websites, and about three or four of them were from porno or spamming sites. So I guess that Spam-x picked up on the string of URL's and gagged on it. Whatever.


Well, obviously when you're trying to post porn spam, Spam-X will consider you a spammer. Spamfilter's aren't that intelligent yet :wink:

bye, Dirk
 Quote

ironmax

Anonymous
Quote by: Dirk

Quote by: winnerdk

Actually, the problem occurred when I tried to copy and past the entire list of referring websites, and about three or four of them were from porno or spamming sites. So I guess that Spam-x picked up on the string of URL's and gagged on it. Whatever.


Well, obviously when you're trying to post porn spam, Spam-X will consider you a spammer. Spamfilter's aren't that intelligent yet :wink:

bye, Dirk



Nope...thats why there are services like mine out there suspending the domain names of abusive spammers. <BG>

Michael
 Quote

Status: offline

scarecrow

Forum User
Junior
Registered: 10/24/07
Posts: 33
I'll leave this to the true pros to verify, but would code like this, placed at the top of lib-custom.php be useful for stopping certain referers at the door?

Text Formatted Code


// Regular Expressions - referer stings to deny access

$badreferers = array('/.referer1/i','http://badjuju.com/i');
   
    foreach($badreferers as $check) {

       if (preg_match($check, $_SERVER['HTTP_REFERER'])) {
        exit;

       // (Or do whatever voodoo curses necessary to deny access)

    }
 


 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Short answer is yes. You should send back not found or something similar. Here's the voodoo:
Text Formatted Code
   if (preg_match($check, $_SERVER['HTTP_REFERER'])) {
        header("HTTP/1.1 404 Not Found");
        header("Status: 404 Not Found");
        exit;
    }

But if you have access to your webserver's .htaccess file, that is the best place to do it. Google htaccess referrer spam and you should find some good tutorials (assuming you are using Apache).
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
As Joe said, do it in a .htaccess (or the httpd.conf, if it's your own server). That's easier to maintain and puts less load on the server since PHP and MySQL won't have to be fired up for the blocked requests.

bye, Dirk
 Quote

Status: offline

scarecrow

Forum User
Junior
Registered: 10/24/07
Posts: 33
your webserver's .htaccess file, that is the best place to do it.


As Joe said, do it in a .htaccess (or the httpd.conf


Ah.. thanks guys! Now that you've said that I recalled the reason we had stuck that code in a site a while back... no .htaccess available there, so that was the quickest, dirtiest way around it. Maybe I'd better leave the ginko biloba ads in and order a little for my memory. LOL
 Quote

All times are EST. The time is now 04:51 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content