Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/08/2007, 09:26
Avatar de alexa10
alexa10
 
Fecha de Ingreso: julio-2002
Ubicación: De este lado...
Mensajes: 293
Antigüedad: 22 años, 9 meses
Puntos: 0
Re: Saber si existe un archivo en directorio virtual

Aca esta el código:

Código:
Public Function verificarImagen(imagen)
	Dim objXMLHTTP, strHTML, strURL
	strURL="http://directorios/"&imagen&".jpg"
	Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
	objXMLHTTP.Open "GET", strURL, False 
	objXMLHTTP.Send 
	If objXMLHTTP.Status >= 400 And objXMLHTTP.Status <= 599 Then 
		imagen2="nodisponible"
	Else
		imagen2=imagen
	End If 
	Set objXMLHTTP = Nothing	
	verificarImagen=imagen2
End Function