CoderZone.org

Category: >> PHP Code >> Fake email addresses Bookmark and Share

<< lastnext >>

Snippet Name: Fake email addresses

Description: Generates lists of fake email addresses. Can be used as a spambot trap to poison a spammer's database with false email addresses.

Also see:
» Transfer or migrate messages betwe...
» Easy way to break apart an email a...
» Send iCal Email Meeting Requests u...
» Email attachments with PHP mail()
» Email w/ attachments class

Comment: (none)

Author: CoderZone
Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

<?php
 
// maximum emails to generate on each page
$maxemails = 50;
 
$tld = array(".com",".com",".biz",".info",".com.au",".co.uk",".sg",".cn",".fr",".de",".org",".gov",".net",".no");
sleep(2);
 
srand ((double) microtime() * 1000000);
for ($i = 1; $i <= $maxemails; $i++) {
        $nextmail = "";
        $rnd = rand(5,12);
        for ($a = 1; $a <= $rnd; $a++) {
                $tmp = rand(97, 122);
                $nextmail .= chr($tmp);
        }
        $fornavn = $nextmail;
        $nextmail .= "@";
        $rnd = rand(7,12);
        for ($a = 1; $a <= $rnd; $a++) {
                $tmp = rand(97, 122);
                $nextmail .= chr($tmp);
        }
        $rnd = rand(1,count($tld));
        $nextmail .= $tld[$rnd];
        echo "<a href=\"mailto:$nextmail\">".$nextmail."</a><br>\n";
}
 
?>
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 10