Dog.net
৺Development offers different ways to include the
৺spamtrap:
Method 1: the include
The easiest way will be a simple include (the @ means : "No Msg in case of Error"):
<? @include ("http://dog-net.org/spamtrap.php");?>
Method 2: the fsockopen
if your hoster has deactivated url-file-
৺access, you can use this function to do the "same" as an include:
<?
$c = getContent("dog-net.org", "/spamtrap.php", "somereferer.tld");
echo $c;
function getContent($host, $path, $referer)
{
fputs($fp, "GET $path HTTP/1.1\r\n"); fputs($fp, "Host: $host\r\n"); fputs($fp, "Referer: $referer\r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Connection: close\r\n\r\n"); $res="";
$res .= @fgets($fp, 128
); }
return $res;
}
?>
Method 3: CSV-File
Some people might think: "hmmm, i don't include sides from foreign servers". Well, then simple use this version:
<?php
$EmailAddresses = @file_get_contents("http://dog-net.org/spamtrap.csv"); // ";"-seperated list $EmailAddresses = explode(";",$EmailAddresses);
echo "<div style=\"display:none\">";
foreach ($EmailAddresses AS $Email){
echo "<a href=\"mailto:{$Email}\" title=\"User\">{$Email}</a><br />\n";
}
echo "</div>";
//set referer
echo '<img src="http://dog-net.org/spamtrap.png" width="0" height="0" alt="a Image" />';
?>
Method 4: CSV-File with fsockopen
Also heres the alternative if url-file
৺access will be disabled:
<?
$c = getContent("dog-net.org", "/spamtrap.csv", $_SERVER["HTTP_HOST"]);
echo "<div style=\"display:none\">";
foreach ($EmailAddresses AS $Email){
echo "<a href=\"mailto:{$Email}\" title=\"User\">{$Email}</a><br />\n";
}
echo "</div>";
//set referer
echo '<img src="http://dog-net.org/spamtrap.png" width="0" height="0" alt="a Image" />';
function getContent($host, $path, $referer)
{
fputs($fp, "GET $path HTTP/1.1\r\n"); fputs($fp, "Host: $host\r\n"); fputs($fp, "Referer: $referer\r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Connection: close\r\n\r\n"); $res="";
$res .= @fgets($fp, 128
); }
return $res;
}
?>