Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/10/2003, 12:47
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535
no. pero se puede validar fácilmente preguntando primero si el url comienza por "www". si es así, se aplica lo anterior. sino, se aplicaría otra cosa que podría ser...


PrimerPunto = InStr(URL, ".")
subdomino = Left(url, PrimerPunto - 1)

o sea que quedaría masomenos así:


<%
URL = "www.graficas.amarillas.com"
'URL = request.servervariables("SERVER_NAME")

If LCase(Left(URL, 3)) = "www" Then

PrimerPunto = InStr(URL, ".")
SegundoPunto = InStr(PrimerPunto + 1, URL, ".")
Subdominio = Mid(URL, PrimerPunto + 1, SegundoPunto - 5)
Response.Write Subdominio

Else

PrimerPunto = InStr(URL, ".")
subdomino = Left(url, PrimerPunto - 1)
Response.Write Subdominio

End if
%>


... aunque no lo verifiqué
__________________
...___...