Search code examples
phpphp4

Shared data multiple sites


I have recently taken on a php web developer position for a large firm. They have multiple sites that share much of the same content (mainly news articles). All the sites although written in PHP, the content is static and manually edited on all the sites when a news article is added or other information is changed. The "senior programmer" there is against using a cms for some reason, against upgrading to php 5, against installing mod_rewrite, basically I have to work within a very small parameter.

I have taken the first 3 weeks to write a whole lot of classes to make some sort of sanity out the mess, but I have to find a way to replicate this data in an easy manner. I am thinking something without the need of a database (the head guy doesnt want to decentralise data so databases anywhere other than the intranet are a no-no), I just want a centralised XML file or something, even if I need to hand edit it... any ideas???


Solution

  • Treat PHP as a templating engine, and have all the main pages pull the html marked up (or xml) articles from an RSS feed from one site.

    Edit the feed to add a new article, add the marked up article to the main site, and it's all very, very simple, easy to understand, and scales.

    No need to involved a 'real' cms, database, or anything.

    -Adam