Home         Jeorge's Blog         Doug's Blog         Links         Other Stuff         Contact

AddThis Social Bookmark Button

Programming Tips
Some simple tricks and ideas for beginner computer programming students.
 
Virtu Software
Inexpensive website design and site promotion work.
 
The Problem Site
Educational math games, word games, brainteasers and puzzles!
 
Tile Puzzler
Pentominoes, Tetrominos, Triominoes, and other puzzling games to play.

Privacy

Make Email Harvesters Choke With This Code

If you want to know what really makes Doug mad, I'll tell you. (Well, besides me and J.D. eating all the chocolate cake before he gets a chance to have any...that makes him REALLY mad!)

No, what really bugs him is spam. That's why he has an Anti-Spam Website. And on that site he talks about email harvesters. An email harvester is a web bot that scans the internet looking for email addresses posted on web pages. Once the bot has the addresses, a spammer can use them to mass market to unsuspecting consumers (you, me, and any old dodo out there).

 


Isn't that annoying? On Doug's Anti-Spam Website, there is a page that randomly generates garbage email addresses for email harvesters to choke on. And the page creates new addresses every time it is loaded, which means every time the spam bot returns, it gets bogged down with another hundred fake email addresses.

Do you want the code needed to add this functionality to your own site? It's right here:

Dim strEmail
Dim I,J,K
randomize timer
For J = 1 to 100
    strEmail=""
    K = int(rnd * 5) + 5
    For I = 1 to K
        strEmail =strEmail & chr(int(rnd * 26) + 65)
    next
    stremail=stremail & "@"

    K = int(rnd * 5) + 8
    For I = 1 to K
        strEmail =strEmail & chr(int(rnd * 26) + 65)
    next

    stremail=stremail & ".com"
    stremail=lcase(stremail)
    Response.Write("<a href=""mailto:" & strEmail & """>" & strEmail & "</a>  ")
next



Of course, you need to be running this inside an ASP page, and the code has to be enclosed in the server code markers: "<%" and "%>".

You can change the number of addresses by modifying the line that says "For I = 1 to 100". Just put a bigger or smaller number in there, but keep in mind that the more addresses you do, the more server resources you're using up!


Here's the output of this code, modified to do 20 email addresses:

tvsurm@frzxridgmmz.com iaobmttgo@sqckzqwwmwdj.com hdzdnz@gnwauobq.com fxzbwh@pixnjrnx.com kromyhl@cxsdbzvdoltn.com oorbz@nvcgmnmr.com hzwcvpr@hvjeniukhqca.com jikdk@bysuxkuhlb.com ltcih@krqfbcrow.com ojjfp@wmmtzisyb.com mufcpmnr@gepgglkiwhc.com wrzgqwgf@chkolujocl.com amwxyflgg@uqwpjqxugvb.com frmobpl@ffxtnrpliu.com mwqeyueyp@nnjpwxipjcvb.com gtepblf@lgarqyjkfa.com ktfpm@obqknfhnh.com rhlixbw@sfyivcvclrei.com yabnf@taddgzdttofc.com wueuz@wwseqaej.com


 


More Fun Stuff