开发者

Feed module that pulls content from remote site PHP

I'm looking for a way to easily package and distribute a module that would pull content from my site and display it like a feed on another site.

Ideally I would build a module that the dev could easily implement into their s开发者_如何学编程ite. It would work similarly to how the feed modules work for twitter. For reference, this is the site http://doingnotplanning.com/main.php

The site is built without a framework in PHP and MySQL

My question is what is the recommended way to do this? RSS? XML? some other way where the remote site wouldn't have to access the DB directly?


You should create a web service, then make your module as an implementation of that web service. I'd suggest using a RESTful architecture with JSON output since that would make it easily queried and captured by a very large number of languages.


Check this out : https://github.com/toopay/CI-Proxy-Library. Its originally writen for Ci as community contribution, but with lil tweak, you should can use it on any php framework. It does can crawl a remote site, also compatible with any REST server.


You may want to consider javascript options. It would matter little what the dev is using technology wise. They could include it as a widget on their page with one line of html. Might take some extra time to develop, but the benefits are great. You could host the javascript yourself if you wanted, and be able to update the code yourself anytime. The processing load would move to the client browser instead of the dev's server as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜