Time for action - setting up the feeds application
1. Create a directory
feeds
in your webroot, that is,/path/to/webroot/feeds:
$ mkdir /path/to/webroot/feeds
2. Create the
/path/to/webroot/feeds/views
directory:$ mkdir /path/to/webroot/feeds/views
3. Copy the
sphinxapi.php
file from the Sphinx source directory to thefeeds
directory:$ cp /path/to/sphinx-0.9.9/api/sphinxapi.php /path/to/webroot/feeds/
4. Get the latest version of SimplePie RSS parser from http://simplepie.org/, extract the archive in any directory of your file system and copy the
simplepie.inc
file from the extracted archive to the/path/to/webroot/feeds
directory:$ cp /path/to/simplepie/simplepie.inc /path/to/webroot/feeds/
5. Create the file
/path/to/webroot/feeds/init.php
with the following code:<?php /** * File: /path/to/webroot/feeds/init.php */ // Database connection credentials $dsn ='mysql:dbname=sphinx_feeds;host=localhost'; $user = 'root'; $pass = ''; // Instantiate the PDO (PHP 5 specific) class try { ...