231,175 Installs and Counting! Get Sparks Now!
Hey! Keep up to date with the project through its beta and public launch by following @getsparks.
Tweet
A Quick Looks At Sparks (EllisLab Official Post)
March 11, 2012
from: codeigniter.com
The Top Sparks of 2011
December 31, 2011
from: codefury.net
CodeIgniter Starter Project − A Starting Point for Any CI Dev
December 12, 2011
from: github.com
NetTuts+ Tutorial for GetSparks
November 24, 2011
from: net.tutsplus.com
A friendly library for creating and parsing RSS feeds
| Contributor | : rjzaworski |
| : Log in to view | |
| Author Website | : http://rjzaworski.com |
| Spark Website | : https://github.com/rjz/Spark-Atomizer |
| Repository Type | : git |
| Number of Installs | : 1,136 |
php tools/spark install -v0.0.3 Atomizer
Or download this version manually:
Get Atomizer-0.0.3.zip
Atomizer provides a friendly interface for managing RSS data, but it doesn't officially support Atom.
Atomizer is available for Codeigniter via Sparks.
Once you've got the spark set up, you can load it using:
$this->load->spark('atomizer/[version #]');
Once Atomizer is loaded, we can get on to more exciting things.
$info = array(
'title' => 'my feed'
);
$items = array(
array(
'title' => 'my first entry',
'description' => 'This is the first entry in my new feed'
),
array(
'title' => 'my second entry',
'description' => 'This is the second entry in my new feed'
)
);
$feed = $this->atomizer->create( $info, $items );
$item = new AtomizerItem(array(
'title' => 'my third feed entry',
'description' => 'This is a new entry for my feed'
));
$feed->addItem( $item );
Two feeds may be combined using the convolve method.
$remix = $feed->convolve( $otherfeed, $info );
The order of an RSS feed is time-agnostic, but applications may benefit from having data ordered by publishing time.
$feed->sort();
header('Content-type: application/rss+xml');
echo $this->atomizer->save( $feed );
$url = 'http://rss.news.yahoo.com/rss/topstories';
$feed = $this->atomizer->load( file_get_contents( $url ) );
foreach( $feed->channels as $channel ) {
$items = $channel->items;
foreach( $items as $item ) {
echo '<li>' . $item->title . '</li>';
}
}
RJ Zaworski rj@rjzaworski.com
Atomizer is released under the JSON License. You can read the license here.
php tools/spark install -v0.0.2 Atomizer
Or download this version manually:
Get Atomizer-0.0.2.zip
php tools/spark install -v0.0.1 Atomizer
Or download this version manually:
Get Atomizer-0.0.1.zip