email-validation.inc 694 B

1234567891011121314151617181920
  1. <?php
  2. /*
  3. * email_validation.inc
  4. * $Id: email-validation.inc,v 1.3 2006/07/05 04:17:40 sfox Exp $
  5. */
  6. /* Try to keep 'badwords' up to date, there are rarely more than 5 per category */
  7. $badwords = array(' drugs ', 'viagra', ' cialis ', 'levitra', 'pharmac', // drugs
  8. ' sex ', 'lesbian', ' porn ', ' chicks ', 'fuck', // sex
  9. 'gambling', 'casino', 'poker', 'blackjack', // gambling
  10. ' loans ', 'mortgage', 'make money', // finance
  11. );
  12. /* Stole this wholesale from master, but someone might know a better one... */
  13. $email_regex = ":^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~ ])+" .
  14. "@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~ ]+\\.)+" .
  15. "[a-zA-Z]{2,6}\$:i";
  16. ?>