SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    code to stop @blahbah registrations

    Is there a way registrations from certain email providers?
    Ie: entering me@hotmail.com returns the result "unacceptable email address" .
    I'm getting hit by spammers and want to deny all hotmail, yahoo and AOL addressess.

  2. #2
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if (preg_match('#.+?@hotmail\.com#i'$email) || preg_match('#.+?@yahoo\.com#i'$email))
      die(
    'unacceptable address'); 
    then you can just continue with the
    PHP Code:
    || preg_match('#.+?@yahoo\.com#i'$email
    replacing yahoo.com with something else, NOTE: the \ must be before the period.

    Hope that helps!
    - website

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You beauty!
    Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •