Jump to content


Photo

Script Que Verifica Se Dominio Está Disponivel


  • Faça o login para participar
2 replies to this topic

#1 ** Arena Jovem **

** Arena Jovem **

    Novato no fórum

  • Usuários
  • 20 posts
  • Sexo:Masculino
  • Localidade:curitiba

Posted 05/06/2009, 13:35

Boa Tarde Galera...

to precisando colocar em meu site, um sisteminha para pesquisa de dominio , aonde no meu site mesmo tera a resposta se esta disponivel para registro ou não..

alguem conhece um script que verifique se o dominio está disponivel???

agradeço desde já!!!

Edição feita por: ** Arena Jovem **, 05/06/2009, 13:36.


#2 kleryson

kleryson

    Mestre

  • Usuários
  • 687 posts
  • Sexo:Masculino

Posted 09/06/2009, 11:09

Bom pelo que sei se você quiser ter uma verificação no registro.br

Tem um prcoedimento deles para se cdastrar segue o link: protocolo epp

Espero que isso te ajude...

(y)??

#3 Fábio Web Arts

Fábio Web Arts

    Web IN Arts

  • Usuários
  • 299 posts
  • Sexo:Masculino
  • Localidade:No Saco De Magé
  • Interesses:Tudo que for da área de Informática

Posted 29/06/2009, 16:13

tenta aew

esse e um simples:
[codebox]<?
function lookup($domain)
{
exec("host -t ns $domain",$hasil);
if (ereg("host not found.",strtolower(trim($hasil[0]))))
// It possible only 1 ns or not found
{
return false;
} else
{
$hasilstr="";
for ($i=0;$i<=count($hasil);$i++)
{
$hasilstr.=ereg_replace("$domain name server","<LI>",$hasil[$i])."<BR>";
}
return $hasilstr;
}
}

?>
[/codebox]
Mais completo:
[codebox]
<?php

class domain_finder
{
var $alternative_tlds=array("com","co.uk","me.uk","ws","org","org.uk","net","net.uk");
var $head_tags=array("<h2>","</h2>");
var $result;

function domain_finder($domain="")
{
if ($domain=="") return true;

$cleaned_domain=$this->clean($domain);
$buf=$this->head_tags[0].$this->domain_exists_pretty_print($cleaned_domain).$this->head_tags[1];
$buf.=$this->check_alternative_domains($cleaned_domain);
$this->result=$buf;

}

function domain_exists_pretty_print($domain)
{
$buf="$domain is ";
if ($result=$this->domain_exists($domain)) $buf.= "not ";
$buf.="available.";
return $buf;
}

function domain_exists($domain)
{
exec("host -t ns $domain",$host_result);
if (preg_match("/host.*not found/",strtolower($host_result[0]))) return false;
return true;
}

function check_alternative_domains($domain)
{
$buf="<p>Alternative domains:</p>\r\n<ul>\r\n";
$d=substr($domain,0,strpos($domain,".")+1); //remove everything after last .
foreach($this->alternative_tlds as $tld)
$buf.="<li>".$this->domain_exists_pretty_print($d.$tld)."</li>";
$buf.="</ul>";
return $buf;
}

function clean($domain)
{
$buf=strtolower($domain);
//remove leading www.
if (preg_match("/^www\./",$domain)) $buf=substr($buf,4);
return $buf;
}

}

?>[/codebox]




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq