Spam the Spammers

Hi

Just for fun, here some nice php snippet which I built into my wordpress Blog with some nice plugin called “Executable PHP widget”.
I’ve got some good sources of spam mails from which I use the “Envelope From” domains as source for the script. Hopefully the harvesters would eat up the shit and spammers would spam themselves :-).

<?php

$ii = 0;

while ($ii < 200) {
        $email = createRandomKey(15)."@".getSpammerDomain();
        echo '<font color="#FFFFFF">'.$email."</font>"."<br>"."\n";
        $ii++;
}

function createRandomKey($amount) {
        $keyset = "abcdefghijklmnopqrstuvwxyz0123456789";
        $randkey = "";
        for ($i=0; $i<$amount; $i++)
        $randkey .= substr($keyset, rand(0, strlen($keyset)-1), 1);
        return $randkey;
}
function getSpammerDomain() {
        $domains =array('domain1.tld','domain2.tld','domain3.tld');
        shuffle($domains);
        return $domains[0];
}
?>

Have fun!