<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP code for Rss Feed &#8211; Programming blog &#8211; website programming blog, blog on website programming .net, java , php and mor</title>
	<atom:link href="https://www.searchenginegenie.com/programming-blog/tag/php-code-for-rss-feed/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.searchenginegenie.com/programming-blog</link>
	<description></description>
	<lastBuildDate>Mon, 03 Dec 2012 14:04:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.5</generator>
	<item>
		<title>Code to get Title and Link in WordPress RSS Feed using PHP</title>
		<link>https://www.searchenginegenie.com/programming-blog/code-to-get-title-and-link-in-wordpress-rss-feed/</link>
					<comments>https://www.searchenginegenie.com/programming-blog/code-to-get-title-and-link-in-wordpress-rss-feed/#respond</comments>
		
		<dc:creator><![CDATA[Camilla]]></dc:creator>
		<pubDate>Fri, 05 Aug 2011 10:41:08 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP code for Rss Feed]]></category>
		<guid isPermaLink="false">http://www.searchenginegenie.com/programming-blog/?p=389</guid>

					<description><![CDATA[You would often want to display the RSS feed of your blog in your personalized home page or your professional page. This can be achieved, if you have basic knowledge on PHP and HTML. Just copy and paste the code below in the section where you want the feed to appear: [php] &#60;?PHP $con = [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: left;">You would often want to display the RSS feed of your blog in your personalized home page or your professional page. This can be achieved, if you have basic knowledge on PHP and HTML.</p>
<p style="text-align: left;">Just copy and paste the code below in the section where you want the feed to appear:</p>
<p>[php]<br />
&lt;?PHP</p>
<p>$con = file_get_contents(&#8216;http://www.xxxxxx.com/blog/feed/&#8217;);/* Feed Url */<br />
$title = getlinks(&quot;&lt;title&gt;&quot;, &quot;&lt;/title&gt;&quot;, $con); // gets Title and stored in array<br />
$url = getlinks(&quot;&lt;link&gt;&quot;, &quot;&lt;/link&gt;&quot;, $con); // gets Url and stored in array</p>
<p>echo &quot;&lt;ul&gt;&quot;;<br />
for($i=0; $i &lt; 6; $i++) {<br />
 echo &#8216;&lt;li&gt;&lt;a href=&quot;&#8217;.$url[$i].&#8217;&quot; title=&quot;&#8217;.$title[$i].&#8217;&quot; &gt;&#8217;.urldecode($title[$i]).'&lt;/a&gt;&lt;/li&gt;&#8217;;<br />
}<br />
echo &quot;&lt;/ul&gt;&quot;;</p>
<p>function getlinks($s1,$s2,$s) {<br />
 $myarray=array();<br />
 $s1 = strtolower($s1);<br />
 $s2 = strtolower($s2);<br />
 $L1 = strlen($s1);<br />
 $L2 = strlen($s2);<br />
 $scheck=strtolower($s);</p>
<p>do {<br />
 $pos1 = strpos($scheck,$s1);<br />
 if($pos1!==false) {<br />
 $pos2 = strpos(substr($scheck,$pos1+$L1),$s2);<br />
 if($pos2!==false) {<br />
 $myarray[]=substr($s,$pos1+$L1,$pos2);<br />
 $s=substr($s,$pos1+$L1+$pos2+$L2);<br />
 $scheck=strtolower($s);<br />
 }<br />
 }<br />
}<br />
while (($pos1!==false)and($pos2!==false));<br />
 return $myarray;<br />
}</p>
<p>?&gt;</p>
<p>[/php]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchenginegenie.com/programming-blog/code-to-get-title-and-link-in-wordpress-rss-feed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.searchenginegenie.com @ 2024-07-06 18:49:37 by W3 Total Cache
-->