什么是最好的方式通过rss提要传递HTML嵌入代码到PHP的RSS解析器? [英] Whats the best way to pass html embed code via rss feed to a rss parser in php?

查看:82
本文介绍了什么是最好的方式通过rss提要传递HTML嵌入代码到PHP的RSS解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将一个flash视频的html嵌入代码放入 rss feed 中,然后由解析器(喜鹊)解析器, 在我的其他网站上。我应该如何对嵌入代码进行编码,然后在另一端进行解码,以便我可以在接收服务器上的 DB 中插入干净的html?

$由于RSS是XML,所以您可能想要查看CDATA,我认为这在各种RSS规范中是有效的。

$ b


$ b

< summary><![CDATA [Data Here]]>



以下是w3schools条目: http://www.w3schools.com/XML/xml_cdata.asp


Im trying to put an html embed code for a flash video into the rss feed, which will then be parser by a parser (magpie) on my other site. How should I encode the embed code on one side, and then decode it on the other so I can insert clean html into the DB on the receiving server?

解决方案

Since RSS is XML, you might want to check out CDATA, which I believe is valid in the various RSS specs.

<summary><![CDATA[Data Here]]>

Here's the w3schools entry on it: http://www.w3schools.com/XML/xml_cdata.asp

这篇关于什么是最好的方式通过rss提要传递HTML嵌入代码到PHP的RSS解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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