没别的,看看吧: <% on error resume next Server.ScriptTimeOut=120 url = "http://www.kj2000.com/xinwen/Detail01.asp?TitleID=595" '新闻来源的页面wstr = getHTTPPage(url) '取得页面内容 if err.number=0 then start=newstring(wstr," <table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"" bgcolor=""#F9F9F9"">") over=newstring(wstr,"<table width=""760"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">") wstr=mid(wstr,start,over-start) wstr=replace(wstr,"#009999","#ffffff") wstr=replace(wstr,"#FFFF80","#000000") wstr=replace(wstr,"Cellspacing=5","Cellspacing=0") wstr=replace(wstr,"HREF=Detail01.asp?TitleID=","HREF=news_view.asp?id=Detail01.asp?TitleID=") end if response.write wstr function getHTTPPage(url) on error resume next dim http set http=Server.createobject("Microsoft.XMLHTTP") Http.open "GET",url,false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage=bytes2BSTR(Http.responseBody) set http=nothing if err.number<>0 then err.Clear end function Function bytes2BSTR(vIn) dim strReturn dim i,ThisCharCode,NextCharCode strReturn = "" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 End If Next bytes2BSTR = strReturn End Function Function NewString(wstr,strng) NewString=Instr(wstr,strng) End Function %>
第一种方法:在左边页面点击事件中发送xmlhttp__post请求到右边服务器上去.2.如果右边服务器上有个接受程序就可以取.呵呵,没有返回程序,所以也办不到.
第二种方法:还是用xmlhttp__get方法将该网站的所有文本DWON下来再找.呵呵.都不太好.
其它还有别的办法吗?
<%
on error resume next
Server.ScriptTimeOut=120
url = "http://www.kj2000.com/xinwen/Detail01.asp?TitleID=595" '新闻来源的页面wstr = getHTTPPage(url) '取得页面内容
if err.number=0 then
start=newstring(wstr," <table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"" bgcolor=""#F9F9F9"">")
over=newstring(wstr,"<table width=""760"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">")
wstr=mid(wstr,start,over-start)
wstr=replace(wstr,"#009999","#ffffff")
wstr=replace(wstr,"#FFFF80","#000000")
wstr=replace(wstr,"Cellspacing=5","Cellspacing=0")
wstr=replace(wstr,"HREF=Detail01.asp?TitleID=","HREF=news_view.asp?id=Detail01.asp?TitleID=")
end if
response.write wstr
function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function Function bytes2BSTR(vIn)
dim strReturn
dim i,ThisCharCode,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function Function NewString(wstr,strng)
NewString=Instr(wstr,strng)
End Function
%>