Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/02/2002, 16:54
vgaray
 
Fecha de Ingreso: octubre-2000
Ubicación: Juarez, Chih.
Mensajes: 161
Antigüedad: 24 años, 6 meses
Puntos: 0
Obtener contenido de otro sitio

Código para obtener contenido de otro sitio diferente al tuyo (no se trae el código fuente)...

<%
Function RevisarComponente(ProgId) 'Funcion para revisar la existencia de un componente x
Dim tmpObject
On Error Resume Next
Set tmpObject = Server.CreateObject(ProgId)
If Err.Number = 0 Then
RevisarComponente = True
Else
RevisarComponente = False
End If
Set tmpObject = Nothing
End Function


Function Traerte_contenido_de_aqui(strURL)
Dim objXML
Set objXML = CreateObject("Msxml2.XMLHTTP")
objXML.open "GET", strURL, false
objXML.send
Traerte_info_de_aqui = objXML.responseText
end Function


If RevisarComponente("Msxml2.XMLHTTP") Then 'revisar que tengas instalado el componente
Response.write Traerte_contenido_de_aqui("http://www.maestrosdelweb.com")
Else
Response.Write "No tienes instalado el componente para poder obtener la info de otro sitio"
End if
%>


---------------------
Tan libre como gratuito!!!