www.gusucode.com > 好22网络TOM新闻小偷源码程序 > Index.asp

    <%
Function GetHttpPage(HttpUrl)
   If IsNull(HttpUrl)=True Or HttpUrl="$False$" Then
      GetHttpPage="$False$"
      Exit Function
   End If
   Dim Http
   Set Http=server.createobject("MSXML2.XMLHTTP")
   Http.open "GET",HttpUrl,False
   Http.Send()
   If Http.Readystate<>4 then
      Set Http=Nothing 
      GetHttpPage="$False$"
      Exit function
   End if
   GetHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
   Set Http=Nothing
   If Err.number<>0 then
      Err.Clear
   End If
End Function

Function BytesToBstr(Body,Cset)
   Dim Objstream
   Set Objstream = Server.CreateObject("adodb.stream")
   objstream.Type = 1
   objstream.Mode =3
   objstream.Open
   objstream.Write body
   objstream.Position = 0
   objstream.Type = 2
   objstream.Charset = Cset
   BytesToBstr = objstream.ReadText 
   objstream.Close
   set objstream = nothing
End Function

Function GetBody(ConStr,StartStr,OverStr,IncluL,IncluR)
   If ConStr="$False$" or ConStr="" or IsNull(ConStr)=True Or StartStr="" or IsNull(StartStr)=True Or OverStr="" or IsNull(OverStr)=True Then
      GetBody="$False$"
      Exit Function
   End If
   Dim ConStrTemp
   Dim Start,Over
   ConStrTemp=Lcase(ConStr)
   StartStr=Lcase(StartStr)
   OverStr=Lcase(OverStr)
   Start = InStrB(1, ConStrTemp, StartStr, vbBinaryCompare)
   If Start<=0 then
      GetBody="$False$"
      Exit Function
   Else
      If IncluL=False Then
         Start=Start+LenB(StartStr)
      End If
   End If
   Over=InStrB(Start,ConStrTemp,OverStr,vbBinaryCompare)
   If Over<=0 Or Over<=Start then
      GetBody="$False$"
      Exit Function
   Else
      If IncluR=True Then
         Over=Over+LenB(OverStr)
      End If
   End If
   GetBody=MidB(ConStr,Start,Over-Start)
End Function
%>
<!--网页头开始-->
<center><!--#include file="tou.asp"--></center>
<!--网页头结束-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>互联网新闻</title>
<style>
body,td,th {
	/*文字大小*/
	font-size: 12px;
	/*文字颜色*/
	color: #2E2E2E;
	/*文字行距*/
	line-height: 20px;
}

a:link {
	text-decoration: none;
	color: #000000;
}

a:visited {
	text-decoration: none;
	color: #000000;
}

a:hover {
	color: #FF6600;
}
</style>
</head>
<link rel="stylesheet" href="http://news.tom.com/style/news2009v6.css" type="text/css" media="screen" />
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="960" align="center">
	<tr>
		<td valign="top">
<table border="1" style="border-collapse: collapse" width="100%" bordercolor="#DDDDDD">
			<tr>
				<td bgcolor="#BE0000" height="25">
				<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
					<tr>
						<td style="padding-left:10px; color:#FFFFFF"><b>当前位置:  <a href="http://www.ok22.com">
						<font color="#FFFFFF">新闻频道</font></a>&nbsp;>&nbsp;互联网新闻首页</b></td>
						<td style="padding-right:10px; color:#FFFFFF" align="right">
好22网络提供技术支持——<a href="index.asp"><font color="#FFFFFF">WwW.OK22.CoM</font></a>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
<script type="text/javascript"><!--
  google_ad_client = "pub-3907352362415459";
  google_ad_format = "js_sdo";
  google_color_bg = "cfe8f6";
  google_cts_mode ="hq";
  google_num_cts = "8";
  google_searchbox_width = 215;
  google_searchbox_height = 26;
  google_link_target = 2;
  google_logo_pos = "left";
  google_rs_pos = "right";
  google_ad_height = 30;
  google_ad_width = 960;
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_sdo.js">
</script>
		<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
			<tr>
				<td>
				<table border="1" style="border-collapse: collapse" width="100%" bordercolor="#99CCFF">
					<tr>
						<td>
						<%
						if Request("riqi")="" Then HttpUrl="http://news.tom.com/"
						StartGet = GetHttpPage(HttpUrl)	
						List=GetBody(StartGet,"<!-- 国内新闻通栏 start -->","<!-- 军事通栏 start -->",False,False)

List=replace(List,"http://post.news.tom.com/s/","Show.asp?ztren=")
List=replace(List,"<a href=""http://news.tom.com/china/""","<a href=""china.asp""")
List=replace(List,"http://news.tom.com/china/shishi/index.html","nzx.asp")
List=replace(List,"http://news.tom.com/china/gat/index.html","nzx.asp")
List=replace(List,"<a href=""http://news.tom.com/world/""","<a href=""world.asp""")
List=replace(List,"http://news.tom.com/world/shizheng/index.html","wzx.asp")
List=replace(List,"http://news.tom.com/world/renwu/index.html","wrw.asp")
List=replace(List,"http://news.tom.com/world/bolan/index.html","wzx.asp")
List=replace(List,".html","")


						
						If List<>"$False$" Then
							Response.write List
						Else
							Response.write "信息暂时无法显示更新中。。。。。"
						End If
						%>
						</td>
					</tr>

</table>

		</td>
	</tr>
</table>
<br>
<!--网页尾开始-->
<!--#include file="wei.asp"-->
<!--网页尾结束-->
</body>

</html>