How to get domain details? |
[eluser]Mareshal[/eluser]
I am trying to get something like this: Code: Domain : domain.com I tried, but I didn't find something to do this. The only thing I could do, was to get DOMAIN_IP (easy). Any ideas? Does CodeIgniter have some plugins/libraries to do something like this?
[eluser]slowgary[/eluser]
Are you trying to start your own WHOIS service? CodeIgniter doesn't store the internet's DNS information. You'd need to get that information from a DNS server.
[eluser]Mareshal[/eluser]
Nooo. I don't want my own whois service. DomainTools is the best. I need to integrate that part in a script. Is some kind of a voting site for different sites, and after I add a site from admin panel, visitors must see some simple WHOIS data. I have some scripts from internet but they return a lot of crap data, and I reall don't need that. I will also implement Alexa rank, Google pagerank and Compete. EDIT: I got this script(view screenshot from server -> http://www.phpace.com/wp-content/uploads.../whois.jpg ) and I modified it a bit, to make the whois query trought a function or a GET variable. Returns what I want, but too much raw data on bottom of the page.
[eluser]Mareshal[/eluser]
Code: <?PHP this is the code to get NameServers for a domain. Taken from another forum, not own made.
[eluser]Unknown[/eluser]
You can get the script for getting nameservers :- <?PHP $result = dns_get_record("YOURDOMAIN.COM", DNS_ANY, $authns, $addtl); $count = sizeof($result); $i=0; $nameserver = array(); while($i < $count) { $temp_array = $result[$i]; if($temp_array['type'] == "NS") { array_push($nameserver, $temp_array ['target']); } $i++; } $count = sizeof($nameserver); $i=0; while($i < $count) { //This is just to show the contents of the nameserver array. print "nameserver[$i]: $nameserver[$i]<br>"; $i++; } ?> Live demo of this :- www.whoismyhost.com |
Welcome Guest, Not a member yet? Register Sign In |