My roomie's board was spammed/attacked by a user who signed up with a hotmail addy this morning, so he asked so be able to screen out people like that.
I reached into the back of my brain, and remembering my *very* minimal VB exposure, pulled out this code. It's so short that i'm just going to post it directly in the forum, rather than giving out a DL URL. If it gets to be popular (yeah, right), then I can post the text file out on a server somewhere.
Anyhoo, here's the code. Feel free to mod the holy living crap out of it. ;-)
--------------------------------------------------------------------------
Look for this code in register.asp, about line 110 or so:
If strAutoLogon <> 1 then
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "<li>You Must give an email address</li>"
end if
if EmailField(Request.Form("Email")) = 0 then
Err_Msg = Err_Msg & "<li>You Must enter a valid email address</li>"
end if
<-------- ### INSERT CODE HERE ###
end if
Somewhere around line 118 of register.asp, right between the 2 "end if" statements:
------------------------------------------------------------------
dim StrResult
StrResult = split(lcase(request.form("Email")),"@")
if StrResult(1) = "hotmail.com" then
Err_Msg = Err_Msg & "<li>To prevent spamming, you cannot use a Hotmail address.<br>"
Err_Msg = Err_Msg & "Contact the <a href=""mailto:" & strSender & """>forum administrator</a> to appeal this policy."
end if
if StrResult(1) = "yahoo.com" then
Err_Msg = Err_Msg & "<li>To prevent spamming, you cannot use a Yahoo address.<br>"
Err_Msg = Err_Msg & "Contact the <a href=""mailto:" & strSender & """>forum administrator</a> to appeal this policy."
end if
-----------------------------------------------------------------
-Quick N' Dirty Email Verification (screens for hotmail & yahoo)
-by Ken Kogler, ken.kogler@curf.edu
-4/21/2001
-Why? Bored on a Saturday...
--------------------------------------------------------------------------
Enjoy!
-Ken
------------------------------------------------------------
Writing a haiku,
in seventeen syllables,
is very diffi--
------------------------------------------------------------
Edited by - Hooloovoo on 21 April 2001 15:35:13