我正在尝试从 RSS 提要中获取信息,并且我已经使用 PHP 和 Jquery 达到了我想要的效果,但我想 cron 它,并且目前我的应用程序开始使用 .js,我的主机说无法启动与 cron。
如果我使用 SimpleXML_load_file,它会带来一切,接受里面的属性<item>....</item>
和一个孩子<a10:updated>
下面是一段生料:
SimpleXMLElement 对象([@attributes] => 数组([version] => 2.0)
[channel] => SimpleXMLElement Object
(
[title] => Bills from current Parliamentary Session
[link] => http://services.parliament.uk/bills
[description] => SimpleXMLElement Object
(
)
[item] => Array
(
[0] => SimpleXMLElement Object
(
[guid] => http://services.parliament.uk/bills/2013-14/finance.html
[link] => http://services.parliament.uk/bills/2013-14/finance.html
[category] => Array
(
[0] => Commons
[1] => Government Bill
)
[title] => Finance
[description] => A Bill To grant certain duties, to alter other duties, and to amend the law relating to the National Debt and the Public Revenue, and to make further provision in connection with finance.
)
[1] => SimpleXMLElement Object
(
[guid] => http://services.parliament.uk/bills/2013-14/humberbridge.html
[link] => http://services.parliament.uk/bills/2013-14/humberbridge.html
[category] => Array
(
[0] => Lords
[1] => Private Bill
)
[title] => Humber Bridge
[description] => A Bill to amend the constitution of the Humber Bridge Board and to confer new borrowing and other powers on it; to make new provision for the recovery of any deficit of the Board from local authorities in the area; to confer new powers for the setting and revision of tolls and to make other provision for and in connection with the operation of the bridge; and for connected purposes.
)
这是 rss 提要:http ://services.parliament.uk/bills/AllBills.rss
有没有另一种方法来获取原始 rss 并添加所有内容?