Determining the hostname/IP address from the MX record in PHP
- by pmmenneg
Hi there, have a basic email domain validation script that takes a user's email domain, resolves the IP address from that and then checks that against various published blacklists. Here is how I am determining the IP:
$domain = substr(strchr($email, '@'), 1);
$ip = gethostbyname($domain);
The problem is that some email address domains, such…