Displaying data from one Drupal site on another

The situation was the following: - Site A is used by companies to enter job descriptions. - Several Sites B want to access these job descriptions to offer a job board for applicants. Constraints: - solution has to be dynamic, e.g. a job entered on Site A has to be online on Site B instantly. - All sites are on the same server, so they can access the local MySQL database of Drupal.
2 answers

Creating module that accesses other website's database

A Drupal module could be created that is able to access another website's database and display the data.

Drupal even provides a way to use its database abstraction layer. In the settings.php an additional $db_url has to be defined as described here: http://drupal.org/node/18429

Providing data using Views-Module, creating module to access it.

There exists a Drupal-Module called Views. It is available for Drupal 5 through 7. It is able to output a site's data in XML (or RSS) format. That way a machine-readable format of the first site's data can be created.

For the other site a Drupal Module could be created that reads the XML file and formats it for output the way desired.

Taggings: