Thursday 2 January 2014

Domain Name Server

DNS is simple it just changes IP Address to human readable. 

How to get the Ip address from the website Name
http://whois.net/domain-name-ip-address/


array dns_get_record ( string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl ]]] )
Fetch DNS Resource Records associated with a hostname
Fetch DNS Resource Records associated with the given hostname.

<?php
$result 
dns_get_record("php.net");print_r($result);?>

host The record in the DNS namespace to which the rest of the associated data refers. class dns_get_record() only returns Internet class records and as such this parameter will always return IN. type String containing the record type. Additional attributes will also be contained in the resulting array dependant on the value of type. See table below. ttl "Time To Live" remaining for this record. This will not equal the record's original ttl, but will rather equal the original ttl minus whatever length of time has passed since the authoritative name server was queried.