Hi,
I have written a feed reader for my personal use.
The php code given below does work.
But it works only with a single feed.
How can I save multiple cookies (array?) and display a few more RSS feeds.
The example page can be found at...
http://shantanuoak.com/test1.php
(add any RSS feed for e.g. http://oksoft.antville.org/rss)
- I want to know how many cookies are set. So the columns required
are total number of cookies + 1. (after adding the cookie(0))
The maximum number of cookies allowed will be 6.
- My JavaScript code will run 2 times or 4 times (after reading cookie)
and display RSS feed contents.
- I want a link to "Delete All Cookies".
<?php
if ($delete==yes) {
setcookie ("FeedCookie5", $formfeedurl1,time()-3600);
}
if (isset($_COOKIE['FeedCookie5'])) { ?>
<script language="javascript" src="http://forever.p3k.org/rss/rss-box.r?url=<?php
echo "$FeedCookie5";
?>&align=left&width=300&frameColor=black&titleBarColor=%23add8e6&titleBarTextColor=
black&boxFillColor=white&textColor=black&fontFace=&maxItems=7&compact=&xmlButton=&j
avascript=true"></script>
<form action="test1.php">
<input type="text" name="formfeedurl1" size="26">
<input type="submit" name="Add" value="Add Feed">
</form>
<a href="test1.php?delete=yes">Delete Cookie</a><br>Please referesh the page
<?php
exit;
}
{
setcookie ("FeedCookie5", $formfeedurl1,time()+3600);
}
?>
<form action="test1.php">
<input type="text" name="formfeedurl1" size="26">
<input type="submit" name="Add" value="Add Feed">
</form>
<a href="test1.php?delete=yes">Delete Cookie</a><br>Please refresh the page
Thanks,
Shantanu Oak