<?php //抓取页面图片的时候防止图片403(防止盗链) echo "<meta name=‘referrer‘ content=‘no-referrer‘>"; $list = file_get_contents($url); $k = preg_match_all(‘/<img [^>]* \/>/‘,$list,$data); $m = preg_grep(‘/alt/‘,$data[0]); foreach($m as $v){ echo $v.‘<br>‘; }
原文:https://www.cnblogs.com/LF-place/p/12549458.html