Git Product home page Git Product logo

dns_get_record_from_server's Introduction

dns_get_record_from_server

PHP function. Get IPv4 and IPv6 addresses of a domain from a specific DNS server.

Because in PHP you can't select the DNS server with the function dns_get_record(), I have made this new function.

Example of use :
With :

<?php
include "dns_get_record_from_server.php";

echo "ecirtam.net from 80.67.169.12 (FDN):\n";
print_r( dns_get_record_from_server('ecirtam.net', '80.67.169.12') );

echo "\n'debian.org' from 2001:910:800::12 (FDN):\n"; // If you have an IPv6 adress
print_r( dns_get_record_from_server('debian.org', '2001:910:800::12') );
?>

You should have :

ecirtam.net from 80.67.169.12 (FDN):
Array
(
    [4] => Array
        (
            [0] => 151.236.6.249
        )

    [6] => Array
        (
            [0] => 2a03:f80:ed15:ca7:ea75:b12d:6cc:4242
        )

)

'debian.org' from 2001:910:800::12 (FDN):
Array
(
    [4] => Array
        (
            [0] => 5.153.231.4
            [1] => 128.31.0.62
            [2] => 130.89.148.14
            [3] => 140.211.15.34
        )

    [6] => Array
        (
            [0] => 2001:610:1908:b000::148:14
            [1] => 2001:41c8:1000:21::21:4
        )

)

dns_get_record_from_server's People

Contributors

oros42 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

5l1v3r1

dns_get_record_from_server's Issues

TXT records

I'm trying to stop shelling out to dig to get TXT records for LetsEncrypt DNS validation. I can't quite figure out how to do this reliably where the data returned is > 255 bytes. I know the leading byte is a length, but I can't seem to get it right. You wouldn't happen to know how to do this, would you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.