确实不好搞定.不过,想了别一个办法.<iframe src="catch.asp"></iframe>catch.aspcatch.asp 文件,用于在网上抓取别人网页.放到了客户端.
能对该内容进行过滤..
嗯,这样,我们可以.把
if(window.location.href!=top.location.href)top.location.href=window.location.href;
这代码给去掉了.只要把"!=" 换成 "=="他就失效啦.呵呵.. <%
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,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
%><%
Dim htmlstr
url = "http://www.baidu.com/"
Response.write "<BASE HREF='" & url & "'>"
set oHttp = server.CreateObject("MSXML2.ServerXMLHTTP")
oHttp.open "GET", url, false
oHttp.send ""
htmlstr = bytes2BSTR(oHttp.responseBody)
htmlstr = Replace(htmlstr,"搜索帮助","灰豆宝宝.net")
'htmlstr = Replace(htmlstr,"!=top","==top") 加这一句就行了.
Response.Write htmlstr
set oHttp = nothing
%>
能对该内容进行过滤..
嗯,这样,我们可以.把
if(window.location.href!=top.location.href)top.location.href=window.location.href;
这代码给去掉了.只要把"!=" 换成 "=="他就失效啦.呵呵.. <%
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,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
%><%
Dim htmlstr
url = "http://www.baidu.com/"
Response.write "<BASE HREF='" & url & "'>"
set oHttp = server.CreateObject("MSXML2.ServerXMLHTTP")
oHttp.open "GET", url, false
oHttp.send ""
htmlstr = bytes2BSTR(oHttp.responseBody)
htmlstr = Replace(htmlstr,"搜索帮助","灰豆宝宝.net")
'htmlstr = Replace(htmlstr,"!=top","==top") 加这一句就行了.
Response.Write htmlstr
set oHttp = nothing
%>
function httpGetHTML(szUrl, divTarget)
{
divTarget.innerHTML = "<p align='center' valign='center'> Loading...</p>";
var oHttp = new ActiveXObject("Microsoft.XMLHTTP");
oHttp.open("GET", szUrl, false);
oHttp.send();
var htmlstr = bytes2BSTR(oHttp.responseBody);
htmlstr = htmlstr.replace("搜索帮助","灰豆宝宝.net");
//htmlstr = htmlstr.replace("!=top","==top");
divTarget.innerHTML = htmlstr;
}function clearHTML(divTarget)
{
divTarget.innerHTML = "New HTML will be here and replace this line text...";
}
</script><script language="vbscript">
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,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
</script>
<BASE href="http://www.baidu.com">
<body>
<div id=bao></div>
<script>
httpGetHTML('http://www.baidu.com', bao)
</script>