菜鸟学院
正则匹配之匹配网页img
时间 2020-08-12
标签
正则
匹配
匹配
网页
img
http://china.nba.com/photos/为例
<?php $str = file_get_contents('http://china.nba.com/photos/'); $preg = preg_match_all('/<img(?:.*)src="(.*?)"(?:.*)>/', $str, $m); var_dump($m);