请教:如何提取网页源代码中的数据?
请问,以下这段网页源代码,如何进行有用数据的提取:
HTTP/1.1 200 OK
Date: Tue, 21 Sep 2004 00:52:12 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3
X-Powered-By: PHP/4.2.3
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=gb2312
abf
<html>
<head>
<title>我的药材</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>BODY {
FONT-SIZE: 9pt; COLOR: #000000
}
TD {
FONT-SIZE: 9pt; COLOR: #000000
}
.bar {
FONT-SIZE: 9pt; COLOR: #ccff99
}
A.bar:link {
FONT-SIZE: 9pt; COLOR: #ccff99; TEXT-DECORATION: none
}
A.bar:visited {
FONT-SIZE: 9pt; COLOR: #ccff99; TEXT-DECORATION: none
}
A.bar:hover {
FONT-SIZE: 9pt; COLOR: #ffffff; TEXT-DECORATION: underline
}
A {
FONT-SIZE: 9pt; COLOR: #003333
}
A:hover {
FONT-SIZE: 9pt; COLOR: red
}
A:visited {
FONT-SIZE: 9pt; COLOR: #002222
}
.input {
BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; FONT-SIZE: 9pt; BORDER-LEFT: 1px dotted; COLOR: #000000; BORDER-BOTTOM: 1px dotted}
.button {
FONT-SIZE: 9pt; COLOR: #000000; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #c8f4c0; BORDER-BOTTOM-STYLE: none
}
INPUT {
FONT-SIZE: 9pt
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<iframe src="http://tomad.cn.tom.com/html.ng/site=cntom&channel=mytom&layer=3&subtree=3&location=C01" width="468" height="60" frameborder="no" border="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no"></iframe></div>
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="17"> </td>
</tr>
<tr>
<td bgcolor="#C6D1BA" height="18"> <img src="images/dot.gif" width="15" height="15"> 我的药材</td>
</tr>
<tr>
<td><img src="images/shim.gif" width="1" height="5"></td>
</tr>
<tr>
<td bgcolor="#719231"><img src="images/shim.gif" width="1" height="1"></td>
</tr>
<tr>
<td>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td height="20" width="50%">三七</td>
<td height="20" width="50%">
35766 个
</td>
</tr>
<tr align="center">
<td height="20" width="50%">天麻</td>
<td height="20" width="50%">
117366 个
</td>
</tr>
<tr align="center">
<td height="20" width="50%">人参</td>
<td height="20" width="50%">
1993 个
</td>
</tr>
<tr align="center">
<td height="20" width="50%">雪莲</td>
<td height="20" width="50%">
3309 个
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/shim.gif" width="1" height="5"></td>
</tr>
<tr>
<td bgcolor="#719231"><img src="images/shim.gif" width="1" height="1"></td>
</tr>
</table>
<script language=javascript src="/script/colorsms.js"></script>
<script language="JavaScript" src="http://www.tom.com/nnselect.js"></script>
<noscript>
<img src='http://ping.nnselect.com/ping.gif?c=115' height='1' width='1'>
</noscript>
0
这是我用winsock向服务器发送数据后得到的,如何提取其中的:三七,天麻,人参及雪莲的个数?
有请: