Cheetah
get_rss_feed.php
Go to the documentation of this file.
1 <?php
2 
8 require_once( './inc/header.inc.php' );
9 require_once( './inc/db.inc.php' );
10 require_once( './inc/profiles.inc.php' );
11 
13  'cheetah_news' => 'https://www.cheetahwsb.com/m/news/act_rss',
14  'cheetah_version' => 'https://www.cheetahwsb.com/version.rss',
15  'cheetah_market' => 'https://www.cheetahwsb.com/m/market/act_rss',
16  'cheetah_market_lang_files' => 'https://www.cheetahwsb.com/m/market/act_rss/language',
17  'cheetah_market_templates' => 'https://www.cheetahwsb.com/m/market/act_rss/template',
18  'cheetah_market_featured' => 'https://www.cheetahwsb.com/m/market/act_rss/featured',
19 );
20 
21 if (isset($aPredefinedRssFeeds[$_GET['ID']])) {
22 
24 
25 } elseif (0 === strncmp('forum|', $_GET['ID'], 6)) {
26 
27  $a = explode('|', $_GET['ID']);
28  if (!is_array($a) || 3 != count($a))
29  exit;
30 
31  $sCont = CH_WSB_URL_ROOT . $a[0] . '/' . $a[1] . '/rss/forum/' . $a[2] . '.htm';
32 
33 } else {
34 
35  $sQuery = "SELECT `Content` FROM `sys_page_compose` WHERE `ID` = " . (int)$_GET['ID'];
36  $sCont = db_value( $sQuery );
37 
38  if( !$sCont )
39  exit;
40 }
41 
42 list( $sUrl ) = explode( '#', $sCont );
43 $sUrl = str_replace( '{SiteUrl}', $site['url'], $sUrl );
44 
45 $iMemID = (int)$_GET['member'];
46 if( $iMemID ) {
47  $aMember = getProfileInfo( $iMemID );
48  $sUrl = str_replace( '{NickName}', $aMember['NickName'], $sUrl );
49 }
50 
51 header( 'Content-Type: text/xml' );
52 echo ch_file_get_contents(defined('CH_PROFILER') && CH_PROFILER && 0 === strncmp($site['url'], $sUrl, strlen($site['url'])) ? ch_append_url_params($sUrl, 'ch_profiler_disable=1') : $sUrl);
header
</code > Be careful enabling this directive if you have a redirector script that does not use the< code > Location</code > HTTP header
Definition: URI.MungeResources.txt:10
$sCont
$sCont
Definition: get_rss_feed.php:36
php
exit
exit
Definition: cart.php:21
$_GET
$_GET['debug']
Definition: index.php:67
ch_append_url_params
ch_append_url_params($sUrl, $mixedParams)
Definition: utils.inc.php:1697
$site
$site['ver']
Definition: version.inc.php:8
ch_file_get_contents
ch_file_get_contents($sFileUrl, $aParams=array(), $sMethod='get', $aHeaders=array(), &$sHttpCode=null)
Definition: utils.inc.php:1357
$aPredefinedRssFeeds
$aPredefinedRssFeeds
Definition: get_rss_feed.php:12
$sUrl
$sUrl
Definition: get_rss_feed.php:43
db_value
db_value($query, $bindings=[], $error_checking=true, $index=0)
Definition: db.inc.php:98
getProfileInfo
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
Definition: profiles.inc.php:249
$iMemID
$iMemID
Definition: get_rss_feed.php:45