All pastes #924575 Raw Edit

Stuff

public text v1 · immutable
·published 2008-03-01 14:22 UTC
rendered paste body
											  require_once('../../inc/simplepiev11.inc');
												// Set your own configuration options as you see fit.
												 echo 'bookmarkstep is: '. $_POST[bookmarkstep] . ' and $_POST[feedurl] is: '. $_POST[feedurl];	

												$feed = new SimplePie();
												$feed->set_feed_url($feed->sanitize($_POST['feedurl'], SIMPLEPIE_CONSTRUCT_IRI)); // Sanitize to ensure this is a URL, not bad code (e.g. XSS)
												$feed->set_cache_location($_SERVER['DOCUMENT_ROOT'].'/cache');
												$success = $feed->init();

												$feed->handle_content_type();	
												var_dump($feed);
												if ($success){
												?>
														<?php
														/*
														Here, we'll loop through all of the items in the feed, and $item represents the current item in the loop.
														*/
														foreach ($feed->get_items() as $item){
														?>
												    echo 'sdasdsdaf';
														<div class="item">
															<p><b><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></b></h2>
															<p><?php echo $item->get_description(); ?></p>
															<p><small>Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></small></p>
														</div>
												
														<?php } ?>

												
												<?php
													}else{
																	echo 'invalid url';
													}
												?>