Foros del Web » Programando para Internet » ASP Clásico »

WhoIs

Estas en el tema de WhoIs en el foro de ASP Clásico en Foros del Web. Este código sirve para implementar un sistema de busqueda de dominios disponibles y en caso de que ya exista una dirección, mostrar la información relacionada ...
  #1 (permalink)  
Antiguo 26/02/2002, 13:39
 
Fecha de Ingreso: octubre-2000
Ubicación: Juarez, Chih.
Mensajes: 161
Antigüedad: 23 años, 6 meses
Puntos: 0
WhoIs

Este código sirve para implementar un sistema de busqueda de dominios disponibles y en caso de que ya exista una dirección, mostrar la información relacionada a ella.

<%
'Code by [email protected]
On Error Resume Next
Response.Buffer = True
Server.ScriptTimeout = 1200
%>
<html>
<head>
<title>US Whois v1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000066" link="#FF0000" vlink="#FF0000" alink="#FF0000">
<%
Dim objXML, objXSL, objFSO
Dim strFile, strFileName, strXSL
Dim strURL, theString, whois_name

' edita la siguiente línea para buscar alguna dirección en espécifico...

domain = "www.maestrosdelweb.com"

strURL = "http://www.netsol.com/cgi-bin/whois/whois?STRING="& Domain & "&SearchType=do&STRING2.x=14&STRI NG2.y=14"
whois_name = "Network Solutions"
'Create Object
Set objXML = CreateObject("Microsoft.XMLHTTP")

' Get Code
objXML.Open "get", strURL, False
objXML.Send
xmlGet = objXML.responseText

if InStr(xmlGet,"is available") > 1 then
sHTML = " is Available</b></font><font color=""#000066""><br&gt ;<br> This is the raw whois output provided by " & whois_name
elseif InStr(xmlGet,"NOT FOUND") > 1 then
sHTML = " is Available</b></font><font color=""#000066""><br&gt ;<br> This is the raw whois output provided by " & whois_name
elseif InStr(xmlGet,"Not found") > 1 then
sHTML = " is Available</b></font><font color=""#000066""><br&gt ;<br> This is the raw whois output provided by " & whois_name
elseif InStr(xmlGet,"No match") > 1 then
sHTML = " is Available</b></font><font color=""#000066""><br&gt ;<br> This is the raw whois output provided by " & whois_name

else
sHTML = " is not available</b></font><font color=""#000066""><br&gt ;<br> This is the raw whois output provided by " & whois_name

my1String = "<pre>"
my2String = "</pre>"

  #2 (permalink)  
Antiguo 26/02/2002, 13:45
 
Fecha de Ingreso: octubre-2000
Ubicación: Juarez, Chih.
Mensajes: 161
Antigüedad: 23 años, 6 meses
Puntos: 0
Re: WhoIs

'Continua

strFind1 = instr(1,xmlGet,my1String,1)
if NOT strFind1 = "" then strFinal1 = mid(xmlGet,strFind1,len(my1String))

strFind2 = instr(1,xmlGet,my2String,1)
if NOT strFind2 = "" then strFinal2 = mid(xmlGet,strFind2,len(my2String))

if NOT strFind1 = "" then RegisterName = mid(xmlGet,strFind1,(strFind2-strFind1))
Set objXML = Nothing
end if
%>
<center>
<%
response.write "<font color=""#FF0000""><br&gt ;<br><b>" & domain & " "
response.write sHTML
response.write "<font color=""#000066"">" & RegisterName & "</font>"

%>
</center>
</body>
</html>


Si necesitas más info para saber como obtener contenido de otro sitio, visita el link http://forosdelweb.com/mensaje.asp?id=63913

Ahi inclusive verás una función que puedes implementar para revisar que tengas el componente necesario y poder ofrecer el servicio 'WhoIs' desde tu sitio.
  #3 (permalink)  
Antiguo 26/02/2002, 14:54
 
Fecha de Ingreso: febrero-2002
Mensajes: 184
Antigüedad: 22 años, 2 meses
Puntos: 0
Re: WhoIs

Gracias Vgaray :)

enrique2
  #4 (permalink)  
Antiguo 27/02/2002, 10:23
Avatar de Ruchu  
Fecha de Ingreso: octubre-2001
Mensajes: 698
Antigüedad: 22 años, 6 meses
Puntos: 2
Re: WhoIs

gracias amigo, esta interesante.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:06.