Skip to content

Instantly share code, notes, and snippets.

@frozonfreak
Created February 1, 2015 12:47
Show Gist options
  • Save frozonfreak/515e510cd8d6ad91944c to your computer and use it in GitHub Desktop.
Save frozonfreak/515e510cd8d6ad91944c to your computer and use it in GitHub Desktop.
Email validation PHP
<?php
class Email_Validate{
function __construct(){
}
//destructor
function __destruct() {
}
public function validate_email($email){
//Retrieve email domain
$email_domain = explode('@', $email)[1];
if(!in_array($email_domain, $this->fakeEmailDomainList()) && checkdnsrr($email_domain))
$response = array("status" => 0,
"message"=> "Valid Email");
else
$response = array("status" => 1,
"message"=> "Invalid Email");
return $response;
}
public function fakeEmailDomainList(){
$fakeEmailDomainArray = array("0-mail.com",
"10minutemail.com",
"30minutemail.com",
"4warding.net",
"amilegit.com",
"antispam.de",
"bio-muesli.net",
"bootybay.de",
"bugmenot.com",
"courrieltemporaire.com",
"cust.in",
"dayrep.com",
"devnullmail.com",
"disposemail.com",
"dodgit.com",
"donemail.ru",
"drdrb.net",
"e4ward.com",
"emailinfive.com",
"emailtemporario.com.br",
"evopo.com",
"fastacura.com",
"fr33mail.info",
"getonemail.com",
"great-host.in",
"guerrillamailblock.com",
"hochsitze.com",
"ieatspam.eu",
"imails.info",
"incognitomail.org",
"jetable.com",
"jnxjn.com",
"kir.ch.tc",
"lhsdv.com",
"lookugly.com",
"mail-temporaire.fr",
"mailcatch.com",
"mailimate.com",
"mailinator.net",
"mailmate.com",
"mailmetrash.com",
"mailnull.com",
"mailzilla.org",
"messagebeamer.de",
"moburl.com",
"mt2009.com",
"mytrashmail.com",
"nobulk.com",
"nomail2me.com",
"nospamfor.us",
"nowmymail.com",
"onewaymail.com",
"ovpn.to",
"plexolan.de",
"prtnx.com",
"recode.me",
"rppkn.com",
"safe-mail.net",
"sandelf.de",
"sendspamhere.com",
"skeefmail.com",
"snakemail.com",
"sogetthis.com",
"spamavert.com",
"spambog.com",
"spambog.ru",
"spambox.us",
"spamfree24.com",
"spamfree24.info",
"spamgourmet.com",
"spamify.com",
"spaml.com",
"spamobox.com",
"spamthisplease.com",
"suremail.info",
"teleworm.us",
"tempemail.biz",
"tempinbox.co.uk",
"tempmail2.com",
"temporaryemail.net",
"thankyou2010.com",
"tmailinator.com",
"trash-amil.com",
"trash2009.com",
"trashmail.com",
"trashmailer.com",
"trbvm.com",
"uggsrock.com",
"wegwerfemail.de",
"willselfdestruct.com",
"yuurok.com",
"zoaxe.com",
"0815.ru",
"20minutemail.com",
"3d-painting.com",
"4warding.org",
"anonbox.net",
"beefmilk.com",
"bobmail.info",
"brefmail.com",
"bumpymail.com",
"cubiclink.com",
"dacoolest.com",
"deadaddress.com",
"discardmail.com",
"dispostable.com",
"dodgit.org",
"dontreg.com",
"dump-email.info",
"email60.com",
"emailmiser.com",
"emailwarden.com",
"fakeinbox.com",
"filzmail.com",
"get1mail.com",
"getonemail.net",
"guerillamail.com",
"h.mintemail.com",
"hotpop.com",
"ieatspam.info",
"incognitomail.com",
"insorg-mail.info",
"jetable.net",
"junk1e.com",
"klzlk.com",
"litedrop.com",
"lopl.co.cc",
"mail.by",
"maileater.com",
"mailin8r.com",
"mailinator2.com",
"mailme.ir",
"mailnator.com",
"mailslite.com",
"mbx.cc",
"mierdamail.com",
"monemail.fr.nf",
"mypartyclip.de",
"nepwk.com",
"noclickemail.com",
"nomorespamemails.com",
"nospamthanks.info",
"online.ms",
"owlpic.com",
"politikerclub.de",
"regbypass.com",
"rtrtr.com",
"safetymail.info",
"saynotospams.com",
"sharklasers.com",
"slopsbox.com",
"sofimail.com",
"spam.la",
"spambob.net",
"spambog.de",
"spambox.info",
"spamcero.com",
"spamfree24.de",
"spamfree24.net",
"spamherelots.com",
"spaminator.de",
"spaml.de",
"spamspot.com",
"supergreatmail.com",
"teewars.org",
"tempalias.com",
"tempemail.com",
"tempinbox.com",
"tempomail.fr",
"temporaryinbox.com",
"thisisnotmyrealemail.com",
"toiea.com",
"trash-mail.com",
"trashemail.de",
"trashmail.net",
"trashymail.com",
"trillianpro.com",
"veryrealemail.com",
"wh4f.org",
"wuzupmail.net",
"zehnminutenmail.de",
"0clickemail.com",
"2prong.com",
"4warding.com",
"60minutemail.com",
"anonymbox.com",
"binkmail.com",
"bofthew.com",
"bsnow.net",
"cosmorph.com",
"curryworld.de",
"dandikmail.com",
"despam.it",
"discardmail.de",
"dodgeit.com",
"doiea.com",
"dontsendmespam.de",
"dumpyemail.com",
"emailigo.de",
"emailsensei.com",
"emailx.at.hm",
"fakeinformation.com",
"fizmail.com",
"get2mail.fr",
"gishpuppy.com",
"guerrillamail.com",
"haltospam.com",
"hulapla.de",
"ieh-mail.de",
"incognitomail.net",
"ipoo.org",
"jetable.org",
"keepmymail.com",
"kulturbetrieb.info",
"lol.ovpn.to",
"m4ilweb.info",
"mail4trash.com",
"mailexpire.com",
"mailinator.com",
"mailismagic.com",
"mailme.lv",
"mailnesia.com",
"mailtemp.info",
"meltmail.com",
"mintemail.com",
"msa.minsmail.com",
"myphantomemail.com",
"no-spam.ws",
"nogmailspam.info",
"nospam4.us",
"notmailinator.com",
"nwldx.com",
"opayq.com",
"pjjkp.com",
"pookmail.com",
"quickinbox.com",
"rmqkr.net",
"s0ny.net",
"safetypost.de",
"selfdestructingmail.com",
"shitmail.me",
"smellfear.com",
"sofort-mail.de",
"spam.su",
"spambob.org",
"spambog.net",
"spambox.irishspringrealty.com",
"spamday.com",
"spamfree24.eu",
"spamfree24.org",
"spamhole.com",
"spamkill.info",
"spammotel.com",
"spamthis.co.uk",
"supermailer.jp",
"teleworm.com",
"tempe-mail.com",
"tempemail.net",
"tempmail.it",
"temporarioemail.com.br",
"thanksnospam.info",
"throwawayemailaddress.com",
"tradermail.info",
"trash-mail.de",
"trashmail.at",
"trashmail.ws",
"trashymail.net",
"tyldd.com",
"webm4il.info",
"whyspam.me",
"yopmail.com",
"zippymail.info",
"spamarrest.com",
"33mail.com",
"e4ward.com",
"emailtmp.com",
"mezimages.net",
"mintemail.com",
"otherinbox.com",
"yourdomain.com",
"0clickemail.com",
"10minutemail.com",
"10minutemail.de",
"123-m.com",
"126.com",
"139.com",
"163.com",
"1pad.de",
"20minutemail.com",
"21cn.com",
"2prong.com",
"33mail.com",
"3d-painting.com",
"4warding.com",
"4warding.net",
"4warding.org",
"6paq.com",
"60minutemail.com",
"7days-printing.com",
"7tags.com",
"99experts.com",
"agedmail.com",
"amilegit.com",
"ano-mail.net",
"anonbox.net",
"anonymbox.com",
"antispam.de",
"armyspy.com",
"beefmilk.com",
"bigstring.com",
"binkmail.com",
"bio-muesli.net",
"bobmail.info",
"bofthew.com",
"boxformail.in",
"brefmail.com",
"brennendesreich.de",
"broadbandninja.com",
"bsnow.net",
"buffemail.com",
"bugmenot.com",
"bumpymail.com",
"bund.us",
"cellurl.com",
"chammy.info",
"cheatmail.de",
"chogmail.com",
"chong-mail.com",
"chong-mail.net",
"chong-mail.org",
"clixser.com",
"cmail.com",
"cmail.net",
"cmail.org",
"consumerriot.com",
"cool.fr.nf",
"courriel.fr.nf",
"courrieltemporaire.com",
"c2.hu",
"curryworld.de",
"cust.in",
"cuvox.de",
"dacoolest.com",
"dandikmail.com",
"dayrep.com",
"dbunker.com",
"dcemail.com",
"deadaddress.com",
"deagot.com",
"dealja.com",
"despam.it",
"devnullmail.com",
"digitalsanctuary.com",
"dingbone.com",
"discardmail.com",
"discardmail.de",
"dispose.it",
"disposableinbox.com",
"disposeamail.com",
"dispostable.com",
"dodgeit.com",
"dodgit.com",
"dodgit.org",
"domozmail.com",
"dontreg.com",
"dontsendmespam.de",
"drdrb.com",
"drdrb.net",
"dudmail.com",
"dump-email.info",
"dumpyemail.com",
"duskmail.com",
"e-mail.com",
"e-mail.org",
"e4ward.com",
"easytrashmail.com",
"einrot.de",
"emailgo.de",
"emailias.com",
"email60.com",
"emailinfive.com",
"emaillime.com",
"emailmiser.com",
"emailtemporario.com.br",
"emailtemporar.ro",
"emailthe.net",
"emailtmp.com",
"emailwarden.com",
"example.com",
"explodemail.com",
"fakeinbox.com",
"fakeinformation.com",
"fakemail.fr",
"fantasymail.de",
"fastacura.com",
"fatflap.com",
"fdfdsfds.com",
"fightallspam.com",
"filzmail.com",
"fizmail.com",
"flyspam.com",
"fr33mail.info",
"frapmail.com",
"friendlymail.co.uk",
"fuckingduh.com",
"fudgerub.com",
"garliclife.com",
"get1mail.com",
"get2mail.fr",
"getairmail.com",
"getmails.eu",
"getonemail.com",
"getonemail.net",
"gishpuppy.com",
"goemailgo.com",
"gotmail.com",
"gotmail.net",
"gotmail.org",
"gotti.otherinbox.com",
"great-host.in",
"guerillamail.org",
"guerrillamail.biz",
"guerrillamail.com",
"guerrillamail.de",
"guerrillamail.net",
"guerrillamail.org",
"guerrillamailblock.com",
"hacccc.com",
"haltospam.com",
"herp.in",
"hidzz.com",
"hochsitze.com",
"hotpop.com",
"hulapla.de",
"hushmail.com",
"ieatspam.eu",
"ieatspam.info",
"imails.info",
"incognitomail.com",
"incognitomail.net",
"incognitomail.org",
"instant-mail.de",
"ipoo.org",
"irish2me.com",
"jetable.com",
"jetable.fr.nf",
"jetable.net",
"jetable.org",
"jsrsolutions.com",
"junk1e.com",
"jnxjn.com",
"kasmail.com",
"klassmaster.com",
"klzlk.com",
"kulturbetrieb.info",
"kurzepost.de",
"lavabit.com",
"letthemeatspam.com",
"lhsdv.com",
"lifebyfood.com",
"litedrop.com",
"lookugly.com",
"lr78.com",
"lroid.com",
"m4ilweb.info",
"mail.by",
"mail114.net",
"mail4trash.com",
"mailbucket.org",
"mailcatch.com",
"maileater.com",
"mailexpire.com",
"mailguard.me",
"mail-filter.com",
"mailin8r.com",
"mailinator.com",
"mailinator.net",
"mailinator.org",
"mailinator.us",
"mailinator2.com",
"mailme.lv",
"mailmetrash.com",
"mailmoat.com",
"mailnator.com",
"mailnesia.com",
"mailnull.com",
"mailquack.com",
"mailscrap.com",
"mailzilla.org",
"makemetheking.com",
"manybrain.com",
"mega.zik.dj",
"meltmail.com",
"mierdamail.com",
"migumail.com",
"mintemail.com",
"mbx.cc",
"mobileninja.co.uk",
"moburl.com",
"moncourrier.fr.nf",
"monemail.fr.nf",
"monmail.fr.nf",
"mt2009.com",
"myemailboxy.com",
"mymail-in.net",
"mypacks.net",
"mypartyclip.de",
"mytempemail.com",
"mytrashmail.com",
"nepwk.com",
"nervmich.net",
"nervtmich.net",
"nice-4u.com",
"no-spam.ws",
"nobulk.com",
"noclickemail.com",
"nogmailspam.info",
"nomail.xl.cx",
"nomail2me.com",
"nospam.ze.tc",
"nospam4.us",
"nospamfor.us",
"nospamthanks.info",
"notmailinator.com",
"nowhere.org",
"nowmymail.com",
"nwldx.com",
"objectmail.com",
"obobbo.com",
"onewaymail.com",
"otherinbox.com",
"owlpic.com",
"pcusers.otherinbox.com",
"pepbot.com",
"poczta.onet.pl",
"politikerclub.de",
"pookmail.com",
"privy-mail.com",
"proxymail.eu",
"prtnx.com",
"putthisinyourspamdatabase.com",
"qq.com",
"quickinbox.com",
"rcpt.at",
"recode.me",
"regbypass.com",
"rmqkr.net",
"royal.net",
"rppkn.com",
"rtrtr.com",
"s0ny.net",
"safe-mail.net",
"safetymail.info",
"safetypost.de",
"saynotospams.com",
"sandelf.de",
"schafmail.de",
"selfdestructingmail.com",
"sendspamhere.com",
"sharklasers.com",
"shitmail.me",
"shitware.nl",
"sinnlos-mail.de",
"siteposter.net",
"skeefmail.com",
"slopsbox.com",
"smellfear.com",
"snakemail.com",
"sneakemail.com",
"snkmail.com",
"sofort-mail.de",
"sogetthis.com",
"spam.la",
"spam.su",
"spam4.me",
"spamavert.com",
"spambob.net",
"spambob.org",
"spambog.com",
"spambog.de",
"spambox.info",
"spambog.ru",
"spambox.us",
"spamcero.com",
"spamday.com",
"spamex.com",
"spamfree24.com",
"spamfree24.de",
"spamfree24.eu",
"spamfree24.info",
"spamfree24.net",
"spamfree24.org",
"spamfree.eu",
"spamgourmet.com",
"spamherelots.com",
"spamhereplease.com",
"spamhole.com",
"spamify.com",
"spaminator.de",
"spamkill.info",
"spaml.com",
"spaml.de",
"spammotel.com",
"spamobox.com",
"spamsalad.in",
"spamspot.com",
"spamthis.co.uk",
"spamthisplease.com",
"spamtroll.net",
"speed.1s.fr",
"spoofmail.de",
"squizzy.de",
"stinkefinger.net",
"stuffmail.de",
"supergreatmail.com",
"superstachel.de",
"suremail.info",
"tagyourself.com",
"talkinator.com",
"tapchicuoihoi.com",
"teewars.org",
"teleworm.com",
"teleworm.us",
"temp.emeraldwebmail.com",
"tempalias.com",
"tempe-mail.com",
"tempemail.biz",
"tempemail.co.za",
"tempemail.com",
"tempemail.net",
"tempinbox.co.uk",
"tempinbox.com",
"tempmaildemo.com",
"tempmail.it",
"tempomail.fr",
"temporaryemail.net",
"temporaryemail.us",
"temporaryinbox.com",
"tempthe.net",
"thanksnospam.info",
"thankyou2010.com",
"thisisnotmyrealemail.com",
"throwawayemailaddress.com",
"tittbit.in",
"tmailinator.com",
"tradermail.info",
"trash2009.com",
"trash2010.com",
"trash2011.com",
"trash-amil.com",
"trash-mail.at",
"trash-mail.com",
"trash-mail.de",
"trashmail.at",
"trashmail.com",
"trashmail.me",
"trashmail.net",
"trashmail.ws",
"trashymail.com",
"trashymail.net",
"tyldd.com",
"umail.net",
"uggsrock.com",
"uroid.com",
"veryrealemail.com",
"vidchart.com",
"vubby.com",
"webemail.me",
"webm4il.info",
"weg-werf-email.de",
"wegwerf-email-addressen.de",
"wegwerf-emails.de",
"wegwerfadresse.de",
"wegwerfemail.de",
"wegwerfmail.de",
"wegwerfmail.info",
"wegwerfmail.net",
"wegwerfmail.org",
"whatiaas.com",
"whatsaas.com",
"wh4f.org",
"whyspam.me",
"willselfdestruct.com",
"winemaven.info",
"wuzupmail.net",
"yahoo.com.ph",
"yahoo.com.vn",
"yeah.net",
"yogamaven.com",
"yopmail.com",
"yopmail.fr",
"yopmail.net",
"yuurok.com",
"xoxy.net",
"xyzfree.net",
"za.com",
"zippymail.info",
"zoemail.net",
"zomg.info",
"bumpymail.com",
"centermail.com",
"centermail.net",
"discardmail.com",
"dodgeit.com",
"e4ward.com",
"emailias.com",
"fakeinformation.com",
"front14.org",
"ghosttexter.de",
"jetable.net",
"kasmail.com",
"link2mail.net",
"mailexpire.com",
"mailinator.com",
"mailmoat.com",
"messagebeamer.de",
"mytrashmail.com",
"nervmich.net",
"netmails.net",
"netzidiot.de",
"nurfuerspam.de",
"oneoffemail.com",
"pookmail.com",
"privacy.net",
"punkass.com",
"sneakemail.com",
"sofort-mail.de",
"sogetthis.com",
"spam.la",
"spambob.com",
"spambob.net",
"spambob.org",
"spamex.com",
"spamgourmet.com",
"spamhole.com",
"spaminator.de",
"spammotel.com",
"spamtrail.com",
"trash-mail.de",
"trashmail.net",
"wuzup.net",
"armyspy.com",
"cuvox.com",
"dayrep.com",
"einrot.com",
"fleckens.hu",
"gustr.com",
"jourrapide.com",
"rhyta.com",
"superrito.com",
"teleworm.us");
return $fakeEmailDomainArray;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment