I've been watching the live connection to my site this morning and found it's been killed by social-buttons.com 4webmaters. So I did a little search and found this code. not a coder so looking for info on where how to add it for best effect;
You create a flie then include the file.
```php
require('no-refer-spam.php');
}
?>
```
no-refer-spam.php
```php
"hardcore.anzwers.net",
"femmesdenudees.com",
"villagedusexe.com",
"gratuitbaise.com",
"inbabes.sexushost.com",
"mature.free-websites.com",
"simple-share-buttons.com",
"darodar.com",
"social-buttons.com",
"hulfingtonpost.com",
"get-free-traffic-now.com",
"buttons-for-website.com",
"4webmasters.org",
"4webmasters.com",
"ranksonic.org",
"ranksonic.com",
);
// array of evil spammers
$ref = $_SERVER["HTTP_REFERER"];
foreach ($spams as $site) {
$pattern = "/$site/i";
if (preg_match ($pattern, $ref)) {
header("Location: $ref"); exit();
}
}
?>
```
The code redirect the request back to itself.