Code to Get Title and Link in WordPress RSS Feed

11 April 2012

sandiego : Code to Get Title and Link in WordPress RSS Feed
<?php
$con = file_get_contents(‘http://sandiego.fortuneinnovations.com/rss.xml'‘);/* Feed Url */
$title = getlinks(“<title>”, “</title>”, $con); // gets Title and stored in array
$url = getlinks(“<link>”, “</link>”, $con); // gets Url and stored in array
echo “<ul>”;
for($i=0; $i < 6; $i++)
{
echo ‘<li><a href=”‘.$url[$i].’” title=”‘.$title[$i].’” >’.urldecode($title[$i]).’</a></li>’;
}
echo “</ul>”;
function getlinks($s1,$s2,$s)
{
$myarray=array();
$s1 = strtolower($s1);
$s2 = strtolower($s2);
$L1 = strlen($s1);
$L2 = strlen($s2);
$scheck=strtolower($s);
do
{
$pos1 = strpos($scheck,$s1);
if($pos1!==false)
{
$pos2 = strpos(substr($scheck,$pos1+$L1),$s2);
if($pos2!==false)
{
$myarray[]=substr($s,$pos1+$L1,$pos2);
$s=substr($s,$pos1+$L1+$pos2+$L2);
$scheck=strtolower($s);
}
}
}
while (($pos1!==false)and($pos2!==false));
return $myarray;
}
?>

Why Fortune Innovations?

  • Cost effective, save up to 40%
  • Hire web development and web designing specialists
  • Project management based out in San Diego
  • 50 plus strong off shore development team based in Bangalore, India
  • Expert teams well verse with Web 2.0 standards
  • Quality-driven delivery model
  • Detailed time sheets, daily reporting and regular status updates
  • WordPress Development in San Diego
  • Drupal Development in San Diego
  • Joomla Development in San Diego
  • eCommerce Magento San Diego
  • Web Development San Diego
  • Web Design San Diego
  • jQuery development San Diego
  • Zend framework development San Diego
  • Airline IBE GDS Integration Navitaire San Diego
  • Airline IBE GDS Integration Aamadeus San Diego