Advertisement
Guest User

Untitled

a guest
Apr 12th, 2016
979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $whitelisted_domains = array('@gmail.com',
  2. '@yahoo.com',
  3. '@hotmail.com',
  4. '@live.com',
  5. '@aol.com',
  6. '@outlook.com',
  7. '@ymail.com',
  8. '@mail.com',
  9. '@live.ca',
  10. '@hotmail.co.uk',
  11. '@msn.com',
  12. '@aim.com',
  13. '@att.net',
  14. '@yahoo.co.uk',
  15. '@web.de',
  16. '@googlemail.com',
  17. '@yahoo.ca',
  18. '@hotmail.ca',
  19. '@live.jp',
  20. '@yahoo.de',
  21. '@hotmail.de',
  22. '@gmx.com',
  23. '@email.com',
  24. '@sbcglobal.net',
  25. '@rocketmail.com',
  26. '@live.co.uk',
  27. '@live.nl',
  28. '@live.dk',
  29. '@hotmail.fr',
  30. '@outlook.de',
  31. '@live.de',
  32. '@live.com.au');
  33. if(!in_array('@' . end(explode('@',$email)), $whitelisted_domains)) {
  34. echo "That domain is not allowed! You may only use emails from the following domains:<br /><br />";
  35. foreach ($whitelisted_domains as $item) {
  36. echo $item . "<br/>";
  37. }
  38. exit;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement