Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

David Ramires

Pesquisa de dominíos

Recommended Posts

Galera bom dia!!!!.. preciso colocar uma pesquisa de dominios em meu site... como posso montar esse tipo de pesquisa?procurei aqui no fórum, mas num achei nada, pode ser que eu tenha usadoas palavras erradas para procurar... alguém tem alguma idéia..? :rolleyes: valew

Compartilhar este post


Link para o post
Compartilhar em outros sites

Andei pesquisando, e peguei um coleção de classes(phpwhois-4.1.1) no site http://www.phpwhois.org

 

e logo após fiz o seguinte:

 

<? include('whois.main.php');$Mostra = new Whois();$consulta= $Mostra->Lookup('phpwhois.org');echo "<pre>";	 print_r($consulta);echo "</pre>";?>
o que apareceu na tela: http://forum.imasters.com.br/public/style_emoticons/default/devil.gif

 

 

Array

(

[regrinfo] => Array

(

[domain] => Array

(

[name] => phpwhois.org

[created] => 2001-04-12

[changed] => 2007-03-21

[expires] => 2008-04-12

[sponsor] => Tucows Inc. (R11-LROR)

[status] => CLIENT DELETE PROHIBITED

[nserver] => Array

(

[ns1.easydns.com] => 216.220.40.243

[ns2.easydns.com] => 209.200.151.4

[remote1.easydns.com] => 209.200.131.4

[remote2.easydns.com] => 205.210.42.19

[ns6.easydns.net] => 209.200.131.10

[ns3.easydns.org] => 209.200.177.4

)

 

)

 

[owner] => Array

(

[handle] => tuMUlxE2pS1HjMhY

[name] => Mark Jeftovic

[address] => Array

(

[address] => Array

(

[0] => 474 Dovercourt Rd #3

)

 

[city] => Toronto

[state] => ON

[pcode] => M6H2W4

[country] => CA

)

 

[phone] => +1.4165358672

=> mark@jeftovic.net

)

 

[admin] => Array

(

[handle] => tuMUlxE2pS1HjMhY

[name] => Mark Jeftovic

[address] => Array

(

[address] => Array

(

[0] => 474 Dovercourt Rd #3

)

 

[city] => Toronto

[pcode] => M6H2W4

[country] => CA

)

 

[phone] => +1.4165358672

=> mark@jeftovic.net

)

 

[tech] => Array

(

[handle] => tuMUlxE2pS1HjMhY

[name] => Mark Jeftovic

[address] => Array

(

[address] => Array

(

[0] => 474 Dovercourt Rd #3

)

 

[city] => Toronto

[pcode] => M6H2W4

[country] => CA

)

 

[phone] => +1.4165358672

=> mark@jeftovic.net

)

 

[registered] => yes

)

 

[regyinfo] => Array

(

[referrer] => ://www.pir.org/

[registrar] => Public Interest Registry

[whois] => org.whois-servers.net

[args] => phpwhois.org

[port] => 43

[type] => domain

)

 

[rawdata] => Array

(

[0] => NOTICE: Access to .ORG WHOIS information is provided to assist persons in

[1] => determining the contents of a domain name registration record in the Public Interest Registry

[2] => registry database. The data in this record is provided by Public Interest Registry

[3] => for informational purposes only, and Public Interest Registry does not guarantee its

[4] => accuracy. This service is intended only for query-based access. You agree

[5] => that you will use this data only for lawful purposes and that, under no

[6] => circumstances will you use this data to: (a) allow, enable, or otherwise

[7] => support the transmission by e-mail, telephone, or facsimile of mass

[8] => unsolicited, commercial advertising or solicitations to entities other than

[9] => the data recipient's own existing customers; or (B) enable high volume,

[10] => automated, electronic processes that send queries or data to the systems of

[11] => Registry Operator or any ICANN-Accredited Registrar, except as reasonably

[12] => necessary to register domain names or modify existing registrations. All

[13] => rights reserved. Public Interest Registry reserves the right to modify these terms at any

[14] => time. By submitting this query, you agree to abide by this policy.

[15] =>

[16] => Domain ID:D69172369-LROR

[17] => Domain Name:PHPWHOIS.ORG

[18] => Created On:12-Apr-2001 14:32:55 UTC

[19] => Last Updated On:21-Mar-2007 16:42:23 UTC

[20] => Expiration Date:12-Apr-2008 14:33:01 UTC

[21] => Sponsoring Registrar:Tucows Inc. (R11-LROR)

[22] => Status:CLIENT DELETE PROHIBITED

[23] => Registrant ID:tuMUlxE2pS1HjMhY

[24] => Registrant Name:Mark Jeftovic

[25] => Registrant Organization:Private World Communications

[26] => Registrant Street1:474 Dovercourt Rd #3

[27] => Registrant Street2:

[28] => Registrant Street3:

[29] => Registrant City:Toronto

[30] => Registrant State/Province:ON

[31] => Registrant Postal Code:M6H2W4

[32] => Registrant Country:CA

[33] => Registrant Phone:+1.4165358672

[34] => Registrant Phone Ext.:

[35] => Registrant FAX:

[36] => Registrant FAX Ext.:

[37] => Registrant Email:mark@jeftovic.net

[38] => Admin ID:tuMUlxE2pS1HjMhY

[39] => Admin Name:Mark Jeftovic

[40] => Admin Organization:Private World Communications

[41] => Admin Street1:474 Dovercourt Rd #3

[42] => Admin Street2:

[43] => Admin Street3:

[44] => Admin City:Toronto

[45] => Admin State/Province:ON

[46] => Admin Postal Code:M6H2W4

[47] => Admin Country:CA

[48] => Admin Phone:+1.4165358672

[49] => Admin Phone Ext.:

[50] => Admin FAX:

[51] => Admin FAX Ext.:

[52] => Admin Email:mark@jeftovic.net

[53] => Tech ID:tuMUlxE2pS1HjMhY

[54] => Tech Name:Mark Jeftovic

[55] => Tech Organization:Private World Communications

[56] => Tech Street1:474 Dovercourt Rd #3

[57] => Tech Street2:

[58] => Tech Street3:

[59] => Tech City:Toronto

[60] => Tech State/Province:ON

[61] => Tech Postal Code:M6H2W4

[62] => Tech Country:CA

[63] => Tech Phone:+1.4165358672

[64] => Tech Phone Ext.:

[65] => Tech FAX:

[66] => Tech FAX Ext.:

[67] => Tech Email:mark@jeftovic.net

[68] => Name Server:NS1.EASYDNS.COM

[69] => Name Server:NS2.EASYDNS.COM

[70] => Name Server:REMOTE1.EASYDNS.COM

[71] => Name Server:REMOTE2.EASYDNS.COM

[72] => Name Server:NS6.EASYDNS.NET

[73] => Name Server:NS3.EASYDNS.ORG

[74] => Name Server:

[75] => Name Server:

[76] => Name Server:

[77] => Name Server:

[78] => Name Server:

[79] => Name Server:

[80] => Name Server:

)

 

)

bom... agora acho que vou ter que brincar um pouco com o for each...

dessas informações, preciso usar apenas:

dominio

razão social

responsável

status

data da criação

 

bom eu acho que a solução seria usar o foreach para tentar recuperar as informações acima.... :unsure:

ou não?

alguém se habilita a dicas... ou alguma coisa mais fácil? já pronta? :huh:

Compartilhar este post


Link para o post
Compartilhar em outros sites

Já está tudo na array, é só puxar o que você quiser agora.Se quiser o domínio é só chamar regrinfo[domain[name]], data de criação regrinfo[domain[created]] e por aí vai.

Compartilhar este post


Link para o post
Compartilhar em outros sites

galera fiz assim oh.. tá bem simples, pois terminei agora..

 

<?php include('whois.main.php');  function brdata($dd){ $data = explode("-",$dd);   if ($dd != ''){	 $nova_data = $data[2]."/".$data[1]."/".$data[0];	 return $nova_data;   } }  function txt($texto){ $novo = explode(":",$texto); 	$novotxt = trim($novo[1]); 	return $novotxt; }$whois = new Whois();$result = $whois->Lookup('davidramires.com.br');//seu domínio aquiecho "<pre>";foreach($result as $chave => $valores){$responsavel = txt($valores[12]);$Registro = $valores[registered];  if($Registro  == "yes"){	$dominio = $valores[domain][name];	$datacriacao = $valores[domain][created];	$razao = $valores[owner][organization];	$S = ($status = $valores[domain][status] == "published") ? "Publicado" : "";	$confirma = 1;   } }echo "</pre>";if($confirma == 1){	echo '<h4>O domínio '.$dominio.' já está registrado. Veja abaixo os dados do detentor do domínio:</h4>';	echo '<b>Domínio:  </b> '.$dominio.'<br>';	echo '<b>Registrado em: </b> '.brdata($datacriacao).'<br>';	echo '<b>Status:		</b> '.$S.'<br>';	echo '<b>Razão Social:  </b> '.$razao.'<br>';	echo '<b>Responsável:   </b> '.$responsavel;  } else {   echo "Domínio Disponível";} ?>

caso alguém esteje procurando algo semelhante.... ai depois o pessoal vai alterando...

Compartilhar este post


Link para o post
Compartilhar em outros sites

powwww q loko tava precisando disto mesmo... penando pra fazer o registro.br e jah tem pronto...me diz uma coisa cara como faço pra retornar o cnpj $cnpj = $valores[rawdata][23];??? se for isso naum tah funcionando... mas enfim bem loko isso ae...

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ramires please.... give me a help man....Como você consegue retornar o CNPJ?? pois não consigo pegalo de jeito nenhum.... é possível???

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.