How to send a trackback using rss
-
I try to make a script which send a trackback to another blog , this being done after another script that is listing a series of articles taken by rss method.
The trackback function i want to run for each rss links.
I made a pretty nice code to do that, but i dont know if work or not!
the code is ><?php include_once(ABSPATH . WPINC . '/rss.php'); if($links = get_post_meta($post->ID, "Links", true)) { $rss = fetch_rss("$links"); if ($rss) { $items = array_slice($rss->items, 0, 20); echo '<ul>'; if ($trackback = true) { foreach ($items as $item) { $desc = htmlspecialchars(substr(strip_tags($item['description']),0,400)); echo '<li><a target="_blank" href="'. $item['link'] .'" title="header=[] body=[' . $desc . ']">' . $item['title'] . '</a></li>'; trackback( $item['link'], $item['title'], "", "" ); } } } } else { print 'Nimic de ar?tat...'; } echo '</ul>'; ?>
Can anybody verify my work?
Thx,
Cristescu Bogdan
- The topic ‘How to send a trackback using rss’ is closed to new replies.