ANIL KUMAR PANIGRAHI 's Blog

Searching for existing domain names?

Posted by: Anil Kumar Panigrahi in: ● December 30, 2009

Hello friends,

Domainr API is used to get the information of existing domain names. it is working for all domains ( most probably might not be work for subdomains).

See the following php script :

function getInfo($domain) {
$domain = urlencode($domain); // encode url here…

$request  = “http://domai.nr/api/json/search?”;
$request .= “q=”.$domain.”&”;

return $response  = file_get_contents($request);
}

Pass the domain name to that function like : ( without http )

$data=getInfo(‘www.anil2u.info’);

Get the results in the json format and convert into string:

$obj = json_decode($data);

echo “This domain is “.$obj->{‘results’}[0]->{‘availability’} ;

Demo @ http://labs.anil2u.info/domainchecking.php

Share on Twitter

No Comments to "Searching for existing domain names?"

Write Comment

About Me

  Anil Kumar Panigrahi
  Software Engineer (PHP)
  Blogger & Founder of Anil Labs
  Baruva, India

You can share with me . . .

My Own Contributions

1) First contribution for codeigniter framework ( multi language support using google translate API ). we can get files from http://github.com/nyros/codeigniter_multilanguage


2) Audio and Video Streaming using FFMpeg and PHP -complete doc file : http://www.docstoc.com/docs/8300349/Audio-and-Video-Streaming

Twitter Updates

Follow me @anil2u
  • http://www.google.co.uk/ logo is changing with mouse move . . . - posted on 07/09/2010 10:57:33
  • True enemies are real friends . . . - posted on 06/09/2010 10:15:29
  • Just watched nice movie " Madrasapattinam ". - posted on 05/09/2010 16:20:48
  • We will always be thankful to our teacher for all the hard work and efforts they have put in, for educating us.- Happy teachers Day . . . :) - posted on 05/09/2010 05:39:13
  • Working on shipping cost functionality (UPS and USPS) for oscommerce shopping cart - posted on 01/09/2010 09:40:03