..:: MX Studio Fóruns ::..: Verificar dominio registrado - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Verificar dominio registrado

#1 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 02 March 2010 - 01:04 AM

Pessoal estou tentando melhorar este script para verificar se o dominio esta ou não registrado se ele esta registrado me mostra as informações do registro ok
O problema e que quando eu marco so os dominio internacional ele funciona perfeitamente já os dominio nacionais não esta funcionado.
se eu conseguir enviar os checkbox com os valores ".com.br,.net.br,.adv.br,.org.br,.tv.br,.gov.br,.adm.br" para ser pesquisado no registro br
e os checkbox com os valores ".com,.net,.org,.info" Internic

Exemplo:
Se for escolhido so dominio internacional ele tem que fazer a consulta só na linha azul e se for escolhido somente dominio nacional tem que fazer consulta só na linha vermelha e se for escolhido nacional e internacional tem que fazer consulta nas duas linha azul e vermelha
If InStr(ext_perm, ",") > 0 Then
xmlhttp.Open "GET", "http://reports.internic.net/cgi/whois?whois_nic=" &Replace(endereco & dominio, " .",".")& "&type=domain", False
xmlhttp.send
Else
xmlhttp.Open "POST", "https://registro.br/cgi-bin/whois/#lresp", False
xmlhttp.send("qr="&Replace(endereco & dominio, " .","."))
End If

Olha eu conseguir fazer este
Verifica dominios quero adptar com os checkbox para depois disponibilizar.

CÓDIGO
<%
Server.ScriptTimeout = 99999999
Dim dominio
Dim endereco
Dim xmlhttp
Dim Resultado
Dim arrayDominios
Dim verificarDominios
Dim contador
Dim detalhe
Dim dominiosInternic
Dim dominiosInt
Dim dominiosRegistroBr
If request("endereco")<>"" then
endereco= Request("endereco")
dominio=Request("dominio")
dominiosRegistroBr = ""&dominio&""
verificarDominios = Replace(dominio, ",", ",")
arrayDominios = Split(verificarDominios, ",")
Response.ContentType = "text/html"
For contador = Lbound(arrayDominios) To Ubound(arrayDominios)
        dominio = arrayDominios(contador)
        detalhe = ""
        If dominio <> "" Then
                        Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
                   If InStr(1, dominiosRegistroBr, ",") > 0 Then
                          xmlhttp.Open "GET", "http://reports.internic.net/cgi/whois?whois_nic="&Replace(endereco & dominio, " .",".")& "&type=domain", False
                       xmlhttp.send
                Else
                        xmlhttp.Open "POST", "https://registro.br/cgi-bin/whois/#lresp", False
                        xmlhttp.send("qr=" &Replace(endereco & dominio, " .","."))
                End If
                Resultado = BinaryToString(xmlhttp.responseBody)
    If InStr(1, dominiosRegistroBr, ",") > 0 Then
            If InStr(1, Resultado, "No match for domain", vbTextCompare) > 0 Or InStr(1, Resultado, "No match for registrar", vbTextCompare) > 0 or not InStr(1, Resultado, "Domain Name", vbTextCompare) > 0 Or InStr(1, Resultado, "No match for registrar", vbTextCompare) > 0 Then
            If saida <> "" Then saida = saida & ""
            saida = saida & "<tr><td width=""3""><input type=""checkbox"" value=""" &Replace(endereco & dominio, " .",".")& """ /></td><td width=""85%""><strong>" &Replace(endereco & dominio, " .",".")& "</strong></td><td width=""15%""><img src=""../images/disponivel.png"" align=""absmiddle"" border=""0"" width=""10"" height=""10""> <font color=""blue"">Disponivel</font></td></tr>"
            Else
            If saida <> "" Then saida = saida & ""
            saida = saida & "<tr><td colspan=""3""><div style=""display:none;"" id=""d"&varCont&"_mais_menos""></div><div style=""display:none;"" id=""periodo_"&varCont&"""><table width=""100%""><tr><td>"& detalhe &  "</td></tr></table></div></td></tr>"
            saida = saida & "<tr><td width=""3""><input type=""checkbox"" value=""" &Replace(endereco & dominio, " .",".")& """ disabled/></td><td width=""85%""><a href=""http://www."&Replace(endereco & dominio, " .",".")&""" target=""_blank""><font color=""red"">" &Replace(endereco & dominio, " .",".")& "</font></a></span></td><td width=""15%""><a class=""rteimage"" onclick=""window.open('Checker_detalhes.asp?dominio="&endereco&"&pont="&Replace(dominio, " .",".")&"','','scrollbars=yes,top=10,left=10,width=300,height=350');"" class=""hiperlink""><img src=""../images/mais.gif"" name=""d"&varCont&"_mais_menos"" align=""absmiddle"" border=""0"" width=""10"" height=""10""> <font color=""red"">Indisponivel</font></a></td></tr>"
            If InStr(1, Resultado, "NOT AUTHORITATIVE", vbTextCompare) > 0 and InStr(1, Resultado, "No match for domain", vbTextCompare) > 0 and InStr(1, Resultado, "No match for registrar", vbTextCompare) > 0 Then
            ElseIf InStr(1, Resultado, "Domain Name:", vbTextCompare) > 0 or InStr(1, Resultado, "Name Server:", vbTextCompare) > 0 Then
            posInicioDetalhe = InStr(1, Resultado, "Domain Name:", vbTextCompare)
            If posInicioDetalhe > 0 Then
            posFimDetalhe = InStr(1, Mid(Resultado, posInicioDetalhe), "Expiration Date", vbTextCompare) + 29
            End If
            If posFimDetalhe > 0 or posInicioDetalhe > 0 Then
            detalhe = Mid(Resultado, posInicioDetalhe, posFimDetalhe)
            detalhe = Replace(detalhe, "Registrar:", "<br />Registrar:")
            detalhe = Replace(detalhe, "Whois Server:", "<br />Whois Server:")
            detalhe = Replace(detalhe, "URL:", "<br />URL:")
            detalhe = Replace(detalhe, "Name Server:", "<br />Name Server:")
            detalhe = Replace(detalhe, "Status:", "<br /> Status:")
            detalhe = Replace(detalhe, "Updated Date:", "<br />Updated Date:")
            detalhe = Replace(detalhe, "Creation Date:", "<br />Creation Date:")
            detalhe = Replace(detalhe, "Expiration Date:", "<br />Expiration Date:")
            end if
            end if
            end if
'==============================                        
            else
                        If InStr(1, Resultado, "Domínio inexistente", vbTextCompare) > 0 Then
                                If saida <> "" Then saida = saida & ""
                                saida = saida & "<tr><td width=""3""><input type=""checkbox"" value=""" &Replace(endereco & dominio, " .",".")& """ /></td><td width=""75%""><strong>" &Replace(endereco & dominio, " .",".")& "</strong></td><td width=""15%""><img src=""../images/disponivel.png"" align=""absmiddle"" border=""0"" width=""10"" height=""10""> <font color=""blue"">Disponivel</font></td></tr>"
                        ElseIf InStr(1, Resultado, "Sintaxe inválida", vbTextCompare) > 0 Or InStr(1, Resultado, "ASN inexistente", vbTextCompare) > 0 Then
                                If saida <> "" Then saida = saida & ""
                                saida = saida & "<tr><td width=""3""></td><td><span style=""color:red;"">" &Replace(endereco & dominio, " .",".")& "</span></td><td>URL invalida</td></tr>"
                        ElseIf InStr(1, Resultado, "Consulta inválida", vbTextCompare) > 0 Then
                                If saida <> "" Then saida = saida & ""
                                saida = saida & "<tr><td width=""3""></td><td><span style=""color:red;"">" &Replace(endereco & dominio, " .",".")& "</span></td><td>Consulta invalida</td></tr>"
                        ElseIf InStr(1, Resultado, "ID entidade:", vbTextCompare) > 0 And InStr(1, Resultado, "servidor DNS:", vbTextCompare) > 0 Then
                                posInicioDetalhe = InStr(1, Resultado, "domínio:", vbTextCompare)
                                If posInicioDetalhe > 0 Then
                                        posFimDetalhe = InStrRev(Mid(Resultado, posInicioDetalhe), "alterado") + 25
                                End If
                                If posFimDetalhe > 0 And posInicioDetalhe > 0 Then
                                        detalhe = Mid(Resultado, posInicioDetalhe, posFimDetalhe)
'                                        detalhe = limparHtml(detalhe)
                                        detalhe = Replace(detalhe, "entidade:", "<br />entidade:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "documento:", "<br />documento:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "responsável:", "<br />responsável:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "país:", "<br />país:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "ID entidade:", "<br />ID entidade:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "ID admin:", "<br />ID admin:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "ID técnico:", "<br />ID técnico:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "ID cobrança:", "<br />ID cobrança:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "servidor DNS:", "<br />servidor DNS:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "status DNS:", "<br />status DNS:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "último AA:", "<br />último AA:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "criado:", "<br />criado:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "expiração:", "<br />expiração:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "alterado:", "<br />alterado:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "status:", "<br />status:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "ID:", "<br />ID:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "e-mail:", "<br />e-mail:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "criado:", "<br />criado:", 1, -1, 1)
                                        detalhe = Replace(detalhe, "alterado:", "<br />alterado:", 1, -1, 1)
                                End If
                                If saida <> "" Then saida = saida & ""
                                  saida = saida & "<tr><td colspan=""3""><div style=""display:none;"" id=""d"&varCont&"_mais_menos""></div><div style=""display:none;"" id=""periodo_"&varCont&"""><table width=""100%""><tr><td>"& detalhe &  "</td></tr></table></div></td></tr>"
                                 saida = saida & "<tr><td width=""3""><input type=""checkbox"" value=""" &Replace(endereco & dominio, " .",".")& """ disabled/></td><td width=""85%""><a href=""http://www."&Replace(endereco & dominio, " .",".")&""" target=""_blank""><font color=""red"">" &Replace(endereco & dominio, " .",".")& "</font></a></span></td><td width=""15%""><a class=""rteimage"" onclick=""window.open('Checker_detalhes.asp?dominio="&endereco&"&pont="&Replace(dominio, " .",".")&"','','scrollbars=yes,top=10,left=10,width=300,height=350');"" class=""hiperlink""><img src=""../images/mais.gif"" name=""d"&varCont&"_mais_menos"" align=""absmiddle"" border=""0"" width=""10"" height=""10""> <font color=""red"">Indisponivel</font></a></td></tr>"

                        End If  
            end if
    end if
    Next
end if
Public Function BinaryToString(xBinary)
        Dim Binary
        Dim RS, LBinary
        If VarType(xBinary)=8 Then Binary = MultiByteToBinary(xBinary) Else Binary = xBinary
        Const adLongVarChar = 201
        Set RS = CreateObject("ADODB.Recordset")
        LBinary = LenB(Binary)
        If LBinary>0 Then
                RS.Fields.Append "mBinary", adLongVarChar, LBinary
                RS.Open
                RS.AddNew
                RS("mBinary").AppendChunk Binary  
                RS.Update
                BinaryToString = RS("mBinary")
        Else
                BinaryToString = ""
        End If
        Set RS = Nothing
End Function

Public Function MultiByteToBinary(MultiByte)
        Dim RS, LMultiByte, Binary
        Const adLongVarBinary = 205
        Set RS = CreateObject("ADODB.Recordset")
        LMultiByte = LenB(MultiByte)
        If LMultiByte>0 Then
                RS.Fields.Append "mBinary", adLongVarBinary, LMultiByte
                RS.Open
                RS.AddNew
                RS("mBinary").AppendChunk MultiByte & ChrB(0)
                RS.Update
                Binary = RS("mBinary").GetChunk(LMultiByte)
        End If
        Set RS = Nothing
        MultiByteToBinary = Binary
End Function

%>
<html>
<head>
<title>Registro de dominios</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/show_ads.css" rel="stylesheet" type="text/css" />
<link href="css/generalhs.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
function Verifica(event){
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
var caract = new RegExp(/[a-z0-9-áéíóúç\b\.-]+$/i);
var caract = caract.test(String.fromCharCode(keyCode));
if(!caract){
// alert("Não digite a extensão do domínio neste campo.\nSelecione a extensão na caixa ao lado.\n\nEm caso de subdomínios, digite apenas a parte principal.\n\nExemplo 1 - Domínio desejado - www.adok.com.br\nDigite apenas 'adok' no campo.\n\nExemplo 2 - Domínio desejado (com subdomínio) - www.suporte.adok.com.br\nDigite apenas 'adok' no campo.");
    keyCode=0;
    return false;
    }
}
function bloqueia(msg){
if(event.button != 1)alert('Acesso negado');
}
    function GetDominio(){    
        if (document.formDom.endereco.value.length ==""){
        alert("Por favor, digite um nome para seu domínio !");
        document.formDom.endereco.focus();
        return false;
        }
            Element.update("content","<span class='txt2'><br /><br />Aguarde, verificando disponibilidade...</span><br /><br /><img src='images/iga_com_br.gif' onmousedown='bloqueia();' width='146' height='12'>");
            var myAjax = new Ajax.Updater({success: 'content'}, 'Dominios.asp?dom=<%=request("dominio")%>', { method: 'get', parameters: 'dom='+document.formDom.dominio.value + document.formDom.dominio.value});
          }
                    <!--
                var imgmais = new Image();
                var imgmenos = new Image();
                imgmais.src = "../images/mais.gif"
                imgmenos.src = "../images/menos.gif"
                function mostrar_mais(quem,mm){
                    var mmimg = eval(mm+"_mais_menos")
                    if (quem.style.display == "none"){
                        quem.style.display = ""
                        mmimg.src = imgmenos.src
                    }else{
                        quem.style.display = "none"
                        mmimg.src = imgmais.src
                    }
                }
            //-->
</script>
</head>
<body class="tabela01">
<form id="formDom" name="formDom" method="post" onSubmit="return GetDominio(this);">
<table  bordercolor="#336699" align="center" border="0">
<tr><td><img src="images/igad_br.gif" alt="Registro de Domínios" width="495" height="21" /></td></tr>
<tr><td width="495">
Para o seu negócio ter sucesso, é fundamental marcar presença na Web. Possuir um site personalizado e um endereço de e-mail próprio (seunome@seunome.com.br) é o primeiro passo.
<table  border="0" align="center" width="500">
<tr><td align="right" class="txt" width="100%">
<fieldset style="width: 495;" class="fildweb" >
<legend><strong>Verifique se o domínio que você quer registrar está disponível </strong></legend>
<table  border="0" align="center" width="100%" >
<tr><td align="right" class="txt">Domínio:<strong> www.</strong> </td>
<td><label>
<input name="endereco" type="text" class="camp" id="endereco" size="20" maxlength="59" value="<%=request("endereco")%>" onkeypress="return Verifica(event);">
</label>
</td>
</tr>
<tr><td colspan="3">
<input type="checkbox" value=".com.br"name="dominio">.com.br
<input type="checkbox" value=".adm.br"name="dominio">.adm.br
<input type="checkbox" value=".br"name="dominio">.br
<input type="checkbox" value=".net.br"name="dominio">.net.br
<input type="checkbox" value=".org.br"name="dominio">.org.br
<input type="checkbox" value=".gov.br"name="dominio">.gov.br
<input type="checkbox" value=".tv.br"name="dominio">.tv.br<br>
<input type="checkbox" value=".com"name="dominio">.com
<input type="checkbox" value=".net"name="dominio">.net
<input type="checkbox" value=".org"name="dominio">.org
<input type="checkbox" value=".info"name="dominio">.info

</td></tr>
<td><td><input name="Button" type="submit" class="bot" value="Procurar" /></td></tr>
</table>
</fieldset>
</td></tr>
</table>
<div  id="d1_mais_menos" align="center">
<div  id="content" align="center">
<table border="1" align="center" cellpadding="1" cellspacing="1" width="100%">
<tr><td align="center" ><b>X</b></td><td align="center" width="75%"><b>Dominios</b></td><td align="center" width="20%"><b>Status</b></td></tr>
<tr><td colspan="4" width="100%">
<div align="center">
<%=saida%>
</div>
</td></tr>
</table>
</div>
</div>
</strong>Extensões disponíveis: <font color="#0000FF">.com.br, .adm.br, .br, .net.br, .org.br, .gov.br, .tv.br,</font><br />
</strong>Extensões disponíveis: <font color="#0000FF">.com, .net</font><br />
</td></tr></table>
</form>
</body>
</html>

0

#2 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 02 March 2010 - 06:05 PM

existe alguns exemplos no repositório de códigos, pode te ajudar a implementar
0

#3 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 02 March 2010 - 10:36 PM

Não coneguir nenhum script
0

#4 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 03 March 2010 - 11:01 AM

existe um ótimo exemplo, inclusive eu uso ele, dá uma pesquisada, que você acha...
0

#5 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 03 March 2010 - 10:33 PM

Já abrie todos os script do repositorio de asp mais não encontrei

Você pode postar o link do post
0

#6 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 04 March 2010 - 10:19 PM

me manda um email que te passo o code....
0

#7 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 05 March 2010 - 02:28 PM

Meu email é
igadino@yahoo.com.br
igadino@hotmail.com

0

#8 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 05 March 2010 - 07:00 PM

ok

olha este exemplo:

CÓDIGO
<%
dim objXML, Resultado, msgErro, srtmethod
Response.Buffer = false
'Set the script timeout to 60 seconds
Server.ScriptTimeout = 60
end_pag = "http://www." & request.form("dominio")&""&request.form("pont")&""
url_dom = request.form("dominio")&""&request.form("pont")&""
dominio=request("dominio")
If request.form("dominio")<>"" then
tipo = split(Request("pont"),".")
tipo_arquivo_2 = "." & tipo(ubound(tipo))
                ext_perm = ".com.br,.adm.br,.br,.org.br,.gov.br,.tv.br"
                exte = split(ext_perm,",")
                a = 0
                for i=0 to ubound(exte)
                if trim(Lcase(tipo_arquivo_2)) = trim(exte(i)) then
                a = 1
                end if
                next
if a <> 1 then
'aqui verifica os dominios internacional
Set ObjXML = Server.CreateObject("Msxml2.serverXMLHTTP")
if instr(url_dom,"-") or instr(url_dom,"+") > 0 then
objXML.Open "get", end_pag, false
else
objXML.Open "GET", end_pag, false
end if
on error resume next
objXML.Send
Resultado = objXML.ResponseText = ResponseText
                                        If instr(dominio, ".") > 0 Or instr(dominio, ",") > 0 or instr(dominio, ";") > 0 or instr(dominio, ":") > 0 or instr(dominio, "=") > 0 then
                                        msgErro = "<br><br><strong><font color='blue'>Impossível, o dominio <font color='#FF0000'>www."&url_dom&" </font> não está disponível para registro</font><br><br></strong>"
                                        else
                if Resultado="" then
                msgErro = "<br><br><strong><font color='blue'>Parabéns, o dominio <font color='#009900'>www."&url_dom&" </font> disponivel para registro</font><br><br></strong>"'        ElseIf instr(1,Resultado,"encontrada nenhuma") Then
        Else
                msgErro = "<br><br><strong><font color='blue'>Impossível, o dominio <font color='#FF0000'>www."&url_dom&" </font> não está disponível para registro</font><br><br></strong>"
                End If
                           end if
                                   else
                                   'aqui verifica os dominios br
                                        If Len(dominio) < 2 THEN
                        msgErro = "Erro ! O domínio deve possuir pelo menos dois caracteres"
                        ElseIf Len(dominio) > 32 THEN
                        msgErro = "Erro ! O domínio deve possuir no máximo 26 caracteres"
                        Else
                        Set ObjXML = Server.CreateObject("Msxml2.ServerXMLHTTP")
                        ObjXML.Open "GET", "http://registro.br/cgi-bin/nicbr/whois?qr="&url_dom, False
                        on error resume next
                        ObjXML.Send
                        Resultado = ObjXML.ResponseText
                                        If instr(dominio, ".") > 0 Or instr(dominio, ",") > 0 or instr(dominio, ";") > 0 or instr(dominio, ":") > 0 or instr(dominio, "=") > 0 then
                                        msgErro = "<br><br><strong><font color='blue'>Impossível, o dominio <font color='#FF0000'>www."&url_dom&" </font> não está disponível para registro</font><br><br></strong>"
                                        else
                        If instr(1,Resultado,"inexistente") Then
                        msgErro = "<br><br><strong><font color='blue'>Parabéns, o dominio <font color='#009900'>www."&url_dom&" </font> disponivel para registro</font><br><br></strong>"'        ElseIf instr(1,Resultado,"encontrada nenhuma") Then
                        ElseIf instr(1,Resultado,"encontrada nenhuma") Then
                        msgErro = "Erro ! Sintaxe Inválida "
                        ElseIf instr(1,Resultado,"Como fazer uma consulta") Then
                        msgErro = "Erro ! Sintaxe Inválida "
                        ElseIf instr(1,Resultado,"Primeiro") Then
                        msgErro = "Domínio de Primeiro Nível Inválido"
                        Else
                        msgErro = "<br><br><strong><font color='blue'>Impossível, o dominio <font color='#FF0000'>www."&url_dom&" </font> não está disponível para registro</font><br><br></strong>"
                        End If
                        End If
                        end if
                                        end if
                Set objXML = Nothing            
        end if          
%>
<html>
<head>
<title>Registro de dominios</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/generalhs.css" rel="stylesheet" type="text/css" />
<link href="css/generalhs.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
function Verifica(event){
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
var caract = new RegExp(/[a-z0-9-áéíóúç\b\.-]+$/i);
var caract = caract.test(String.fromCharCode(keyCode));
if(!caract){
// alert("Não digite a extensão do domínio neste campo.\nSelecione a extensão na caixa ao lado.\n\nEm caso de subdomínios, digite apenas a parte principal.\n\nExemplo 1 - Domínio desejado - www.adok.com.br\nDigite apenas 'adok' no campo.\n\nExemplo 2 - Domínio desejado (com subdomínio) - www.suporte.adok.com.br\nDigite apenas 'adok' no campo.");
        keyCode=0;
        return false;
        }
}
function bloqueia(msg){
if(event.button != 1)alert('Acesso negado');
}
        function GetDominio(){  
                if (document.formDom.dominio.value.length ==""){
                alert("Por favor, digite um nome para seu domínio !");
                document.formDom.dominio.focus();
                return false;
                }
                  Element.update("content","<span class='txt2'><br /><br />Aguarde, verificando disponibilidade...</span><br /><br /><img src='images/iga_com_br.gif' onmousedown='bloqueia();' width='146' height='12'><br><br>");
                  var myAjax = new Ajax.Updater({success: 'content'}, 'verifica_dominios.asp?dom=<%=request("dominio")%>', { method: 'get', parameters: 'dom='+document.formDom.dominio.value + document.formDom.pont.value});
                }
                
</script>
<style type="text/css">
<!--
.style2 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<form id="formDom" name="formDom" method="post" onSubmit="return GetDominio(this);">
<table  bordercolor="#336699" align="center" border="0">
<tr><td><img src="images/igad_br.gif" alt="Registro de Dom&iacute;nios" width="495" height="24" /></td>
</tr>
<tr><td width="495"><span class="style2"> Para o seu negócio ter sucesso, é fundamental marcar presença na Web. Possuir um site personalizado e um endereço de e-mail próprio (seunome@seunome.com.br) é o primeiro passo. </span>
  <table  border="0" align="center" width="500">
<tr><td width="100%" align="right" class="txt style2">
<fieldset style="width: 495;" class="fildweb" >
<legend><strong>Verifique se o dom&iacute;nio que voc&ecirc; quer registrar est&aacute; dispon&iacute;vel </strong></legend>
<table  border="0" align="center" >
<tr><td align="right" class="txt">Dom&iacute;nio:<strong> www.</strong> </td>
<td><label>
<input name="dominio" type="text" class="camp" id="dominio" size="20" maxlength="59" value="<%=request("dominio")%>" onKeyPress="return Verifica(event);">
</label>
  <font color="#990000"><strong><font color="#000000">.</font></strong>
  <label>
  <select id="pont" name="pont" class="text">
    <%
lista=".com.br,.com,.net,.adm.br,.br,.net.br,.org,.org.br,.gov.br,.tv.br,.info,.nam
e"
MTT="com.br,com,net,adm.br,br,net.br,org,org.br,gov.br,tv.br,info,name"
arrsetor3=split(request("pont"),", ")
arrsetores3=split(lista,",")
mostra_form=split(MTT,",")
for y = LBOUND(mostra_form) to ubound(mostra_form)
response.write"<option value="&arrsetores3(y)
for x= LBOUND(arrsetor3) to ubound(arrsetor3)
if arrsetor3(x) = arrsetores3(y) then response.write " selected"
next
response.write">"&mostra_form(y)&"</option>"&vbcr
next
%>
  </select>
  </label>
  </font></td>
<td><input name="Button" type="submit" class="bot" value="Procurar" /></td></tr></table>
</fieldset>
</td></tr>
</table>

<table  border="0" align="center" width="500">
<tr><td width="100%" align="left" class="txt style2">          
<div  id="content" align="center">
<div align="center">
<%=msgErro%></div>
<div align="left">
<%
If request("dominio")<>"" then
if Resultado = "" or instr(1,Resultado,"inexistente") then%>
<a href="contratar_dominio.asp?dom=<%=url_dom%>">Registrar este domínio</a>
<%else%>
<a href="#"><b>Ver quem registros</b></a>
<%
end if
end if
%>
</div>
</div>
</strong>Extens&otilde;es dispon&iacute;veis: <font color="#0000FF">.com.br, .adm.br, .br, .net.br, .org, .org.br, .gov.br, .tv.br,</font><br />
</strong>Extens&otilde;es dispon&iacute;veis: <font color="#0000FF">.com, .net,  .info, .name</font><br />
</td></tr>
</table>
</td></tr>
</table>
</form>
</body>
</html>


link
0

#9 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 05 March 2010 - 10:47 PM

Hahahahaha

Este poste foi eu que fiz

Olha este link aqui Verifica Dominio foi uma melhorado deste post, eu pretendo melhorar muito mais para publicar no forum

olha estou tentando uzar checkbox com os dominio nacionais e internacionais, quando os checkbox marcado for dominio ".com, .net, .org, . info" a consulta deve ser feita na internic e se for ".com.br,.net.br,.adv.br,.org.br,.tv.br,.gov.br,.adm.br" a consulta tem que ser feita registro br

e se os valores do checkbox tem dominio nacional e internacional a consulta tem que ser feita na internic e no registro.br ao mesmo tempo.
0

#10 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 06 March 2010 - 01:56 PM

coloca os checkbox e recupera eles, dá um split, para separar e baseia sua pesquisa em cima dele
0

#11 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 06 March 2010 - 07:07 PM

O problema ta e ai porque não estou conseguindo fazer
vc pode me dah uma luz de como fazer isto?
0

#12 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 06 March 2010 - 08:04 PM

olha este exemplo, pega a lógica

CÓDIGO
if qtd_check= "" then
Response.write("erro..."
response.redirect("outra_pagina.asp")
else
qtd_check= split(Request.Form("check"),",")
if qtd_check= ""
check= Split(Request.Form("check"), ",")

For i = 1 To Request.Form("check").Count

Response.write request.form("check")(i)&"<BR>" & request.form("qtd_check")(i)&"<BR>"
SQL = "SELECT * FROM tabela Where '"&request.form("qtd_check")(i)&"')"

0

#13 User is offline   igadino 

  • Group: Membros
  • Posts: 65
  • Joined: 10-June 05

Posted 06 March 2010 - 09:08 PM

Essa logica não funciona porque ja tentei mais não dar certo.

usei assim

QUOTE
function nacional()
...
end function

function internacional()
...
end function

function nacionalinternacional()
...
end function

function consulta(dominio,tipo)
Select Case tipo
Case "nacional"
call nacional()
Case "internacional"
call internacional()
Case Else
call nacionalinternacional()
End Select
end function

0

#14 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2077
  • Joined: 04-November 08

Posted 08 March 2010 - 10:53 PM

parabéns
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)