
01/03/2002, 19:32
|
| | Fecha de Ingreso: octubre-2000 Ubicación: Juarez, Chih.
Mensajes: 161
Antigüedad: 24 años, 6 meses Puntos: 0 | |
Re: Buscador basado en los Meta Tags <%
'continua
Function Obtener_titulo(de_esta_pagina)
Set objFSO2 = Server.CreateObject("Scripting.FileSystemObje ct")
Set objFile = objFSO2.OpenTextFile(Server.MapPath(de_esta_pagina ))
On error resume next
strContents = objFile.ReadAll
objFile.Close
Set objFile = Nothing
Set objFSO2 = Nothing
Set objRegExp = New RegExp
strMatch = "<title>(.*?)<\/title>"
objRegExp.Pattern = strMatch
objRegExp.IgnoreCase = True
objRegExp.Global = True
Set objMatches = objRegExp.Execute(strContents)
If objMatches.Count > 0 then
Obtener_titulo = "<b>Título:</b> " & resaltar(Mid(objMatches(0).Value, 8, Len(objMatches(0).Value) - 15),clave)
Else
Obtener_titulo = "Página sín título"
End If
Set objRegExp = Nothing
End Function
%>
<%
Function obtener_metas(de_esta_pagina)
Set objFSO2 = Server.CreateObject("Scripting.FileSystemObje ct")
Set objFile = objFSO2.OpenTextFile(Server.MapPath(de_esta_pagina ))
do until objFile.AtEndOfStream
Linea = objFile.ReadLine
If Instr(Linea,"<META") then
lineas = Split(Linea,chr(34),-1,1)
On error resume next
If Len(Lineas(1))>0 and Len(Lineas(3))>0 then
obtener_metas = obtener_metas & "<b>" & Lineas(1) & "</b> " & resaltar(Lineas(3),clave) & "<br>" & "|"
End if
End if
loop
objFile.Close
Set objFile = Nothing
Set objFSO2 = Nothing
End Function
%>
<%
Function FormatURL(strPath)
iPos = InStr(1,strPath,"wwwroot",1)
str = Mid(strPath,iPos+7,Len(strPath))
FormatURL = Replace(str,"\","/")
End Function
%> |