I have a RSS feed
which I can display directly (hard code) in the script by doing
and it works OK.
Going a step ahead I want to display this by calling it as variable in a browser
and want to include in the code as
[/code]
CarpCacheShow('.urlencode(stripslashes($_GET['rss'])).')
it works. So I am making error in
part of the code. How to capture for feed. the "=" and "&"
If I use <?php echo $rss; ?> it displays the link.
Can anyone suggest how I can solve this.
TIA.
Code:
[URL unfurl="true"]http://www.buy.com/rss/feed.asp?loc=273&grp=4&pid=1519777[/URL]
which I can display directly (hard code) in the script by doing
Code:
CarpCacheShow('[URL unfurl="true"]http://www.buy.com/rss/feed.asp?loc=273&grp=4&pid=1519777')[/URL]
and it works OK.
Going a step ahead I want to display this by calling it as variable in a browser
Code:
/test.php?rss=[URL unfurl="true"]http://www.buy.com/rss/feed.asp?loc=273&grp=4&pid=1519777[/URL]
and want to include in the code as
[/code]
CarpCacheShow('.urlencode(stripslashes($_GET['rss'])).')
Code:
I am using this way because urlencode ensures that it will work even if I have spaces or something in the link. stripslashes ensures that I don't have backslashes in front of quote marks. $_GET ensures that the code will work on servers that don't set globals for the query string arguments.
Unfortunately this does not work. If I use a regular rss feed [URL unfurl="true"]www.cnn.com/services/podcasting/newscast/rss.xml[/URL] by calling
[code]
/test.php?rss=[URL unfurl="true"]www.cnn.com/services/podcasting/newscast/rss.xml[/URL]
it works. So I am making error in
Code:
?loc=273&grp=4&pid=1519777
part of the code. How to capture for feed. the "=" and "&"
If I use <?php echo $rss; ?> it displays the link.
Can anyone suggest how I can solve this.
TIA.