{"id":3337,"date":"2015-08-25T17:48:33","date_gmt":"2015-08-25T16:48:33","guid":{"rendered":"https:\/\/blog.ed.gs\/?p=3337"},"modified":"2015-08-25T17:48:33","modified_gmt":"2015-08-25T16:48:33","slug":"digdns-record-fetching-with-php","status":"publish","type":"post","link":"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/","title":{"rendered":"Dig\/DNS Record Fetching With PHP"},"content":{"rendered":"

I’ve started a new job recently as a Linux Systems Administrator for Webanywhere Ltd. A major part of my new role is automation, so there may be a fair few posts regarding automation of Linux server tasks coming soon.<\/p>\n

I’m currently transferring thousands of domains between two different providers and to aid things I’ve had to create a script to get certain DNS records via the ‘dig’ command, I know PHP fairly well so it was easier to write a script in that to speed up the process. In it’s current form it will show the IP for the record type chosen, it’s pretty easy to modify to do other things, drop me a comment below if you need anything specific and you’re stuck.<\/p>\n

\n<\/pre>\n

*UPDATE* 09\/09\/15<\/p>\n

I’ve since fleshed this out massively and it can be found at Github @ https:\/\/github.com\/Coopeh\/PHP-MultiDig<\/a>, it will continue to be updated with extra options in the future.<\/p>\n

There’s also a demo at publab.ed.gs\/dig\/<\/a> if you wish to try it.<\/p>\n","protected":false},"excerpt":{"rendered":"

I’ve started a new job recently as a Linux Systems Administrator for Webanywhere Ltd. A major part of my new role is automation, so there may be a fair few posts regarding automation of Linux server tasks coming soon. I’m currently transferring thousands of domains between two different providers and to aid things I’ve had […]<\/p>\n","protected":false},"author":2,"featured_media":3401,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false},"categories":[41,51,58],"tags":[],"yoast_head":"\nDig\/DNS Record Fetching With PHP - E<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dig\/DNS Record Fetching With PHP - E\" \/>\n<meta property=\"og:description\" content=\"I’ve started a new job recently as a Linux Systems Administrator for Webanywhere Ltd. A major part of my new role is automation, so there may be a fair few posts regarding automation of Linux server tasks coming soon. I’m currently transferring thousands of domains between two different providers and to aid things I’ve had […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/\" \/>\n<meta property=\"og:site_name\" content=\"E\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-25T16:48:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/08\/27.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1365\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ed\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ed\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/\",\"url\":\"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/\",\"name\":\"Dig\/DNS Record Fetching With PHP - E\",\"isPartOf\":{\"@id\":\"https:\/\/ed.gs\/#website\"},\"datePublished\":\"2015-08-25T16:48:33+00:00\",\"dateModified\":\"2015-08-25T16:48:33+00:00\",\"author\":{\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ed.gs\/#website\",\"url\":\"https:\/\/ed.gs\/\",\"name\":\"E\",\"description\":\"automation, consultancy, project management, web\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ed.gs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628\",\"name\":\"Ed\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/ed.gs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g\",\"caption\":\"Ed\"},\"url\":\"https:\/\/ed.gs\/author\/ed\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dig\/DNS Record Fetching With PHP - E","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/","og_locale":"en_GB","og_type":"article","og_title":"Dig\/DNS Record Fetching With PHP - E","og_description":"I’ve started a new job recently as a Linux Systems Administrator for Webanywhere Ltd. A major part of my new role is automation, so there may be a fair few posts regarding automation of Linux server tasks coming soon. I’m currently transferring thousands of domains between two different providers and to aid things I’ve had […]","og_url":"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/","og_site_name":"E","article_published_time":"2015-08-25T16:48:33+00:00","og_image":[{"width":2048,"height":1365,"url":"https:\/\/static.ed.gs\/wp-content\/uploads\/2015\/08\/27.jpg","type":"image\/jpeg"}],"author":"Ed","twitter_misc":{"Written by":"Ed","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/","url":"https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/","name":"Dig\/DNS Record Fetching With PHP - E","isPartOf":{"@id":"https:\/\/ed.gs\/#website"},"datePublished":"2015-08-25T16:48:33+00:00","dateModified":"2015-08-25T16:48:33+00:00","author":{"@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ed.gs\/2015\/08\/25\/digdns-record-fetching-with-php\/"]}]},{"@type":"WebSite","@id":"https:\/\/ed.gs\/#website","url":"https:\/\/ed.gs\/","name":"E","description":"automation, consultancy, project management, web","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ed.gs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/ed.gs\/#\/schema\/person\/d775615f2296ad0129fa3ea66346c628","name":"Ed","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ed.gs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fe1dfaed09e6bdceb557d3008f5cc47?s=96&d=mm&r=g","caption":"Ed"},"url":"https:\/\/ed.gs\/author\/ed\/"}]}},"_links":{"self":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3337"}],"collection":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/comments?post=3337"}],"version-history":[{"count":0,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/posts\/3337\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media\/3401"}],"wp:attachment":[{"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/media?parent=3337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/categories?post=3337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ed.gs\/wp-json\/wp\/v2\/tags?post=3337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}