Question: Yahoo blocks emails from our website. We've written them to reverse that decision without much luck. So we block site registrations from @yahoo.com emails. Our problem is Yahoo has other email domains besides @yahoo.com. For instance @ymail.com, @rocketmail.com, @btinternet.com, and I'm sure many more. Plus international domains.

So the question is, how do I check if an email domain belongs to Yahoo? I supposed I could try to find a definitive list of all Yahoo domains, but I'm sure there has to be a better way. For instance doing some kind of host lookup on the domain.

Are there any suggestions to do that in PHP?

Answer: 
Definitive list is probably the best way to go. You don't want to have to do some kind of lookup every time someone registers for your site. But if you really don't want to use a static list, you should be able to use `getmxrr()` and see if the MX record is from yahoo.
ymail.com and rocketmail.com both list yahoo.com as their DNS MX servers, so that's an obvious giveaway. btinternet.com, however, doesn't.

You can use [`getmxrr()`](http://php.net/manual/en/function.getmxrr.php) to retrieve the MX list