Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $whitelisted_domains = array('@gmail.com',
- '@yahoo.com',
- '@hotmail.com',
- '@live.com',
- '@aol.com',
- '@outlook.com',
- '@ymail.com',
- '@mail.com',
- '@live.ca',
- '@hotmail.co.uk',
- '@msn.com',
- '@aim.com',
- '@att.net',
- '@yahoo.co.uk',
- '@web.de',
- '@googlemail.com',
- '@yahoo.ca',
- '@hotmail.ca',
- '@live.jp',
- '@yahoo.de',
- '@hotmail.de',
- '@gmx.com',
- '@gmx.de',
- '@email.com',
- '@sbcglobal.net',
- '@rocketmail.com',
- '@live.co.uk',
- '@live.nl',
- '@live.dk',
- '@hotmail.fr',
- '@outlook.de',
- '@live.de',
- '@live.com.au');
- if(!in_array('@' . end(explode('@',$email)), $whitelisted_domains)) {
- echo "That domain is not allowed! You may only use emails from the following domains:<br /><br />";
- foreach ($whitelisted_domains as $item) {
- echo $item . "<br/>";
- }
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement