- $url="http://www.CodeSnippet.cn";
- $contents=@file_get_contents($url);
- //preg_match_all("/<p class=\\"right forumcount\\">(.*?)<\\/p>/is",$contents,$content);
- preg_match_all("/<h3>(.*?)<\\/h3>/is",$contents,$content);
- print_r($content[0]);
- //该片段来自于http://www.codesnippet.cn/detail/290920136223.html
来源: http://www.codesnippet.cn/detail/290920136223.html