2012年3月6日

正则提取URL

摘要: <?phpfunction getPageLink($url){ set_time_limit(0); $html = file_get_contents($url); preg_match_all("/<a(s*[^>]+s*)href=([\"|']?)([^\"'>\s]+)([\"|']?)/ies",$html,$out); $arrLink = $out[3]; $arrUrl = parse_url($url); if( isset($arrUrl['path']) 阅读全文

posted @ 2012-03-06 19:36 奋斗者 阅读(2861) 评论(0) 推荐(0)

导航