Retroceder   Foros del Web > Programación para sitios web > ASP Clásico

Respuesta
 
Herramientas Desplegado
Antiguo 26-feb-2002, 12:39   #1 (permalink)
vgaray está en el buen camino
 
Fecha de Ingreso: noviembre-2002
Ubicación: Juarez, Chih.
Mensajes: 160
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 dave@dwiwebdesign.com
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>"

vgaray está desconectado   Responder Citando
Antiguo 26-feb-2002, 12:45   #2 (permalink)
vgaray está en el buen camino
 
Fecha de Ingreso: noviembre-2002
Ubicación: Juarez, Chih.
Mensajes: 160
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.
vgaray está desconectado   Responder Citando
Antiguo 26-feb-2002, 13:54   #3 (permalink)
MauroViale está en el buen camino
 
Fecha de Ingreso: noviembre-2002
Mensajes: 184
Re: WhoIs

Gracias Vgaray :)

enrique2
MauroViale está desconectado   Responder Citando
Antiguo 27-feb-2002, 09:23   #4 (permalink)
Ruchu está en el buen camino
 
Avatar de Ruchu
 
Fecha de Ingreso: noviembre-2002
Mensajes: 675
Re: WhoIs

gracias amigo, esta interesante.
Ruchu está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 05:16.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93