Hi guys, i was messing around with some php scripts that will create an RSS feed of your Product title and Description.
First create a PHP file “rss.php” add the following code into it and put it in your root dir (or create an rss directory and put it there). The CDATA commands helps the parsing of some characters in xml format so the feed gets validated and show up correctly.
```php
header('Content-type: text/xml'); ?>
$dbhost = "localhost"; // almost always localhost.
$dbname = "databasename"; // Database Name, In our case, its news
$dbuser = "username"; // Database Username
$dbpass = "password"; // Databse Password
$connect = mysql_connect("$dbhost","$dbuser","$dbpass");// Connecting to Database
mysql_select_db($dbname) or die (mysql_error()); // Selecting Database
?>
Your Title Here
Link of you page
Description of your store
$sql = "SELECT * FROM cscart_product_descriptions";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result)){
?>
=$row['product']; ?>
]]>
http://www.yoursite.com/index.php?target=productsproduct_id=$row['product_id']; ?>
}
?>
```
Of course you can play with the rows and add short description instead of full. I was trying to grab data from the "cscart_products" table to list the price from the "list_price" row but i dont know how to do it. My knowledge is very limited, if someone else could make this happen it would be great!
If you like, for security reasons you can make an additional 'config.php' file to open the connection to the database and store it in a safer place than the root of your server and then insert an "include" command inside the 'rss.php' to call it.
Here in Greece RSS feeds for online stores are usefull in some ways especially in sites like the froogle but in Greek version but it's not free ;)
Feel free to make any suggestion to a n00b! :D