php获取文章图片列表

直接看代码把:

$pattern = '#<img(.+?)src\s*=\s*[\"|\']([^"|^\']+?)[\"|\']([^>]*?)>#'; preg_match_all($pattern, $content, $match); $url_list = $match[2];$url_list = array_unique($url_list); // 图片去重

 

posted @ 2022-11-08 11:52  潘潘潘的博客  阅读(34)  评论(0)    收藏  举报