110,537
社区成员
发帖
与我相关
我的任务
分享
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><h3>ip138.com IP查询(搜索IP地址的地理位置)</h3></td>
</tr>
<tr>
<td align="center"><h1>您查询的IP:111.174.91.11</h1></td>
</tr>
<tr>
<td align="center"><ul class="ul1"><li>本站主数据:湖北省武汉市 电信</li><li>参考数据一:湖北省武汉市 电信</li></ul></td>
</tr>
<tr>
<td align="center">如果您发现查询结果不详细或不正确,请使用<a href="ip_add.asp?ip=111.174.91.101"><font color="#006600"><b>IP数据库自助添加</b></font></a>功能进行修正<br/><br/>
<iframe src="/jss/bd_460x60.htm" frameborder="no" width="460" height="60" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/></td>
</tr>
<form method="get" action="ips1388.asp" name="ipform" onsubmit="return checkIP();">
<tr>
<td align="center">IP地址或者域名:<input type="text" name="ip" size="16"> <input type="submit" value="查询"><input type="hidden" name="action" value="2"></td>
</tr><br>
<br>
</form>
</table>
public static string GetIPAddress(string data)
{
Regex Reg = new Regex("<td align=\"center\"><ul class=\"ul1\"><li>(.*?)</li><li>(.*?)</li></ul></td>");
Match Match = Reg.Match(data);
if (Match != null && Match.Success)
{ return Match.Groups[1].Value + " " + Match.Groups[2].Value; }
else { return ""; }
}