|
CaRP: Caching RSS Parser - Manual Version 2.7.5 (8/13/2003)
Download | Installation | Configuration | Functions | Examples | Donations
Examples:
<?php require_once "/path/to/carp.php"; CarpConf('preitem','• '); CarpConf('maxitems',5); CarpConf('poweredby',''); CarpShow("http://nwt.mouken.com/rss/headlines.rdf", "nwt.example.multiple.a"); CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.multiple.a"); ?> The following code will display two feeds on the same page. The first will have a bullet before each item. The second has all of its settings reset to the defaults by calling the function CarpConfReset(), and then the maximum number of items to display set to 5. In such a simple example, you would usually just add a line like "CarpConf('preitem',"");" to reset the one configuration setting that had been overridden, but CarpConfReset() can be useful when you've overridden a number of options for one feed and then wish to display another feed with significantly different formatting. Note that it is a good idea to set up background refreshing when accessing many newsfeeds from the same page:
<?php
require_once "/path/to/carp.php"; CarpConf('preitem','• '); CarpConf('poweredby',''); CarpShow("http://nwt.mouken.com/rss/headlines.rdf", "nwt.example.multiple.b"); CarpConfReset(); CarpConf('poweredby',''); CarpConf('maxitems',5); CarpShow("http://antone.mouken.com/dreams/rss/antone.talk.1.rdf", "dreams.example.multiple.b"); ?> |
Example Output:
Two with the same formatting:
Two with different formatting:
![]() |