SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie_Item » add_to_service()

add_to_service()

Description

class SimplePie_Item {
	add_to_service ( string $item_url, [ string $title_url = null ])
}

Generates the proper URL for adding an item (e.g. posting) to a bookmarking-type service.

Availability

  • Available since SimplePie 1.0.

Parameters

item_url (required)

The URL and querystring up until the item's URL is required.

title_url

The querystring parameter key for the title to get passed in.

Examples

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->init();
$feed->handle_content_type();
 
foreach ($feed->get_items() as $item)
{
	echo '<a href="' . $item->add_to_service('http://del.icio.us/post/?v=4&url=', '&title=') . '">Add to Delicious</a>';
}

See Also


reference/simplepie_item/add_to_service.txt · Last modified: 2011/03/06 03:56 (external edit)