首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

html联动的兑现

2012-11-06 
html联动的实现html内容:?正则匹配HTML内容//header(Content-Type:text/htmlchasetutf-8)$str fil

html联动的实现

html内容:

?

正则匹配HTML内容

//header('Content-Type:text/html;chaset=utf-8;');$str = file_get_contents("http://www.myip.cn/ename.cn");//$str = "<td class='td_bold'>IP所在地:</td><td id='res_iplocation_0'>广东省中山市 电信<br><img width=18 border=0";preg_match("/IP所在地:<\/td><td id=\'res_iplocation_0\'>([".chr(0xa1)."-".chr(0xff)."\s]+)<br>/si", $str, $matches);//preg_match("/res_iplocation_0[\'"\s]*>(.*?)<br>/si", $str, $matches);print_r($matches);
?

热点排行