SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can someone explain this Php Function to me: checkdnsrr

    http://us2.php.net/checkdnsrr

    it is supposed to "Check DNS records corresponding to a given Internet host name or IP address"

    I am trying to use it to verify the validity of email addresses but I don't understand how checkdnsrr does that.

    Does it check every email domain to see if it is a real domain?

  2. #2
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PHP Manual
    checkdnsrr -- Check DNS records corresponding to a given Internet host name or IP address
    Description
    int checkdnsrr ( string host [, string type])


    Searches DNS for records of type type corresponding to host. Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred.

    type may be any one of: A, MX, NS, SOA, PTR, CNAME, AAAA, or ANY. The default is MX.

    Host may either be the IP address in dotted-quad notation or the host name.


    Note: AAAA type added with PHP 5.0.0



    Note: This function is not implemented on Windows platforms. Try the PEAR class Net_DNS.
    it says it just returns true if it finds the internet_host_name/IP_addrss else returns false. so you can split the email address and can test for the validity of the internet host.
    i am guessing then you would be supplying MX as second parameter(by default though) to check for email server.

    hope fully i am right. i couldn't test it because it won't work on Windows platform

  3. #3
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It loks up the DNS records of the IP address or hostname you supply it. You could then feasibly compare this to a blacklist of DNS records I suppose.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  4. #4
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    D'oh beaten to it
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  5. #5
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where does it look up those DNS records to see if they are valid?

  6. #6
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It looks up these records in the public doman name servers (DNS) that make the internet function.

  7. #7
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by swdev
    It looks up these records in the public doman name servers (DNS) that make the internet function.
    it sounds like it would take a long time to search through all the domain names to verify if a submitted name is 'legitimate'.

  8. #8
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you think so.
    How long does it take to find a website?
    if you do www.sitepoint.com, the very first time from your computer, how much time does it take??(not even second eh)
    then you can figure out the rest.(adding some extra wasted time just to calculate risk factors)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •