Home > Backend Development > PHP Tutorial > 同时提取多条新闻中的文本一例_PHP

同时提取多条新闻中的文本一例_PHP

WBOY
Release: 2016-06-01 12:29:19
Original
793 people have browsed it

本文为一个提取一批新闻网页中的文本的小程序,它可以将各篇新闻的内容存为以该新闻标题为文件名的文本文件。如有更好的处理方法,请和我联系:
lwx3069@sina.com
这里以人民网中的“今日要闻”下的新闻为例.
($url) ? "" : $url = "http://www.unn.com.cn/GB/channel2/3/11/index.html"; // 今日要闻
if(isset($url)&&$url!="") {
$str = implode("",file($url));
$str_ary = explode("

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template