forked from tomatocart/TomatoCart-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rss.php
36 lines (28 loc) · 1.06 KB
/
rss.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
$Id: rss.php $
TomatoCart Open Source Shopping Cart Solutions
http://www.tomatocart.com
Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
include('includes/application_top.php');
include('includes/classes/rss.php');
if ( isset($_GET['categories_id']) ) {
$categories_id = is_numeric($_GET['categories_id']) ? $_GET['categories_id'] : 0;
$rss = toC_RSS::buildCategoriesRSS($categories_id);
}else if ( isset($_GET['group']) ) {
$rss = toC_RSS::buildProductsRss($_GET['group']);
}
$xml = new osC_XML($rss, 'UTF-8');
// Now send the file with header() magic
header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/xml");
echo $xml->toXML();
?>