It's really not possible to tell without consulting a massive database, and even then it's still hit and miss. It's possible to determine what domains are associated with a specific IP -- http://www.myipneighbors.com/ for example provides this, but even the results provided by that site aren't comprehensive -- I don't think it even takes into consideration round-robin DNS entries, for instance.
You can do an RDNS lookup: http://us.php.net/gethostbyaddr (or system() the *NIX host command) but don't count on a lot of people having properly set reverse DNS for every IP.
People should have a properly setup RDNS record on their mail server at the least. One way to do what you're looking for would be to query the MX record (dns_get_record()) then `host` the answer section and see if it points to the same domain name as that submitted, which it should -- BUT, you'll still find people with dedicated IP addresses using a shared mail server.
If you find a solution, I'd love to hear it.
|