<?php
$s="";
for ($x=2; $x<=10; $x++) {
$url="http://www.ali213.net/news/html/2018-12/399323_{$x}.html";
$html = file_get_contents($url);
//preg_match('~<div class="news_l">([\s\S]*?)<div class="page">~', $html, $m);
//游侠爆笑
preg_match('~<div class="n_show" id="Content">([\s\S]*?) <div align="center" class="page_fenye">~', $html, $m);
$s.=$m[1];
}
print_r($s);
?>
php抓取网页所有的图片标签,包括下一页分页
猜你喜欢
转载自blog.csdn.net/t1174148618/article/details/105120413
今日推荐
周排行