Need programmer/script for lookup

Discussion in 'Programming' started by dbinto, Mar 20, 2007.

  1. #1
    Looking for a programming/script that would do the following.

    You type in a domain;

    Results show.

    DNS and IP for the domain.

    Thats it.

    Thanks and let me know cost and time frame. References from other projects would be helpful.

    Thanks
    db
     
    dbinto, Mar 20, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    
    function dig ($domain) 
    {
       $dig = `dig $domain`;
       preg_match_all("/in\s+ns\s+(.+?)\s+/is", $dig, $name_servers, PREG_PATTERN_ORDER );
       preg_match_all("/$domain.\s+[0-9]+\s+in\s+a\s+([0-9.]+)\s+/is", $dig, $ips, PREG_PATTERN_ORDER );
       $dns[name_servers] = $name_servers[1];
       $dns[ips] = $ips[1];
       return $dns;
    } 
    echo "<pre>";
    print_r( dig( "digitalpoint.com" ) );
    
    PHP:
    nix only ...... 0 cost, 0 timeframe.....
     
    krakjoe, Mar 21, 2007 IP
    sarahk likes this.