<?php
header("content-type:text/html;charset=utf8");//编码
$url = "https://blog.youkuaiyun.com/zph1234/rss/list";//路径(网上路径)
$html = file_get_contents($url);//利用file_get_contents采集
$yy = '#<item>(.*)</item>#isU';//采集的正则(所有内容)
preg_match_all($yy,$html, $html2);//正则匹配
$html3 = [];
foreach($html2 as $k=>$v){//处理数组让三维数组变二维
$html3 = $v;
}
$b = '#<title>(.*)</title>#isU';//采集的正则(标题)
$b1 = '#<description>(.*)</description>#isU';//采集的正则(内容)
$b2 = '#<pubDate>(.*)</pubDate>#isU';//采集的正则(日期)
$b3 = '#阅读:([1-9]\d*+).*</description>#isU';//采集的正则(阅读量)
$b4 = '#<link>(.*)</link>#isU';//采集的正则(原文链接)
$b5 = '#<author>(.*)</author>#isU';//采集的正则(作者名)
$arr &#
获取优快云博客中RSS数据
最新推荐文章于 2022-11-09 00:19:11 发布