Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
2,331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 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. '@gmx.de',
  24. '@email.com',
  25. '@sbcglobal.net',
  26. '@rocketmail.com',
  27. '@live.co.uk',
  28. '@live.nl',
  29. '@live.dk',
  30. '@hotmail.fr',
  31. '@outlook.de',
  32. '@live.de',
  33. '@live.com.au');
  34. if(!in_array('@' . end(explode('@',$email)), $whitelisted_domains)) {
  35. echo "That domain is not allowed! You may only use emails from the following domains:<br /><br />";
  36. foreach ($whitelisted_domains as $item) {
  37. echo $item . "<br/>";
  38. }
  39. exit;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement