通过php在Intranet上显示RSS提要项目 [英] Display RSS feed item on intranet via php

查看:68
本文介绍了通过php在Intranet上显示RSS提要项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一整天都在做这件事.我们在办公室有一个内联网,有些个人电脑没有互联网访问权限.我正在尝试将本网站的 RSS (http://news.bbc.co.uk/onthisday/) 放入带有图像的表格中并将其显示在内网上,这可能吗?有人可以指出我正确的方向吗?

I've been at this the whole day. We have an intranet at the office, some PC's does not have internet access. I'm trying to get this website's RSS (http://news.bbc.co.uk/onthisday/)into a table with images and display it on the intranet, is this at all possible? Can someone please point me in the right direction?

推荐答案

http://newsrss.bbc.co.uk/rss/on_this_day/front_page/rss.xml

这是您的 XML,只需使用 SimpleXML 从中获取数据即可.真的很简单.

There's your XML, just use SimpleXML to get your data from it. Very simple really.

让你开始的东西:

$a = curl_init("http://newsrss.bbc.co.uk/rss/on_this_day/front_page/rss.xml");
curl_setopt($a, CURLOPT_RETURNTRANSFER,1);
$b = curl_exec($a);

$xml = simplexml_load_string($b);

var_dump($xml);

这篇关于通过php在Intranet上显示RSS提要项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆