Page is a not externally linkable
flyerguy - 6:24 pm on Mar 25, 2005 (gmt 0)
strip.asp> dim DMOZURL DMOZURL = "http://dmoz.org" & request.querystring() Dim DMOZresult MyArray = Split(strtitle,"/")
You can strip anything you'd like out of the feed output. The following example is for outputting a DMOZ feed but could be easily adapted to your needs.
<%
Function gethtmlresult(DMOZURL,htmlbegin,htmlend)
Dim objXMLHTTP, htmlresult, htmlcontent
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", DMOZURL, False
objXMLHTTP.Send
htmlcontent = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
Dim begin, theend
begin = Instr(htmlcontent,htmlbegin)
theend = Instr(htmlcontent,htmlend)
If begin <> 0 and theend <> 0 Then
htmlresult = mid(htmlcontent,InStr(1,htmlcontent,htmlbegin,1), InStr(1,htmlcontent,htmlend,1) - InStr(1,htmlcontent,htmlbegin,1))
Else
Response.Write " "
End If
gethtmlresult = htmlresult
End Function
%>
dmoz.asp>
<% response.buffer=true %>
<!--#include file="strip.asp" -->
<%
If Request.QueryString() = "/" Then
Response.Redirect "http://www.yourpage.com"
End If
DMOZresult = gethtmlresult(DMOZURL,"</form>","<table width=""95%"" cellpadding=0 cellspacing=0>")
strtitle = request.querystring()
'strtitle = Replace(strtitle,"/"," ")
i = (UBound(MyArray) - 1)
strtitle = MyArray(i)
strtitle = Replace(strtitle,"_"," ")
%>