If you're pulling in an RSS feed, I would recommend using wp_widget_rss_output().<div><br></div><div>For example, here's how I pull in the WPORG support forum RSS feed for Oenology:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><?php</div><div>wp_widget_rss_output( array(</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>'url' => '<a href="http://wordpress.org/support/rss/tags/oenology">http://wordpress.org/support/rss/tags/oenology</a>',</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>'title' => 'Latest Oenology Support Topics',</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>'items' => 5,</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>'show_summary' => 0,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>'show_author' => 0,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>'show_date' => 1</div>
<div>) );</div><div>?></div></div></blockquote><div><br></div><div>Simple, and safe.</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Sat, Aug 27, 2011 at 10:58 AM, Qamar Ashraf <span dir="ltr"><<a href="mailto:life.object@gmail.com">life.object@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks to all contributors to guide me in right direction.<div>I am going to re-write my logic to load dynamic data via <b>wp_remote_get</b>.</div>
<div><div><div></div><div class="h5"><br><div class="gmail_quote">On Sat, Aug 27, 2011 at 8:45 PM, Simon Prosser <span dir="ltr"><<a href="mailto:pross@pross.org.uk" target="_blank">pross@pross.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">file_get_contents is disabled on most shared servers.<br>
<div><div></div><div><br>
On 27 August 2011 16:25, Qamar Ashraf <<a href="mailto:life.object@gmail.com" target="_blank">life.object@gmail.com</a>> wrote:<br>
> Thanks Michael,<br>
> I will digg the wp_remote_get() API.<br>
><br>
> On Sat, Aug 27, 2011 at 8:22 PM, Michael Fields <<a href="mailto:michael@mfields.org" target="_blank">michael@mfields.org</a>> wrote:<br>
>><br>
>> You might want to look into wp_remote_get()<br>
>><br>
>> <a href="http://codex.wordpress.org/Function_API/wp_remote_get" target="_blank">http://codex.wordpress.org/Function_API/wp_remote_get</a><br>
>><br>
>> It's the only way I write remote requests for WordPress extensions.<br>
>><br>
>> On Aug 27, 2011, at 8:16 AM, Qamar Ashraf wrote:<br>
>><br>
>> > Hello,<br>
>> > I have integrated a "Theme Reference" page to provide some useful<br>
>> > information about my framework. I am going to load remote data by reading<br>
>> > RSS Feed. Here is the code logic,<br>
>> ><br>
>> > function get_chip_life_feed( $feed_url ) {<br>
>> > $content = file_get_contents( $feed_url );<br>
>> > $feed = new SimpleXmlElement( $content );<br>
>> > return $feed;<br>
>> > }<br>
>> > $feed = get_chip_life_feed(<br>
>> > '<a href="http://www.tutorialchip.com/feed/chip-life-tutorials/" target="_blank">http://www.tutorialchip.com/feed/chip-life-tutorials/</a>' );<br>
>> ><br>
>> > I have got following Warning after submitting the theme,<br>
>> ><br>
>> > WARNING: file_get_contents was found in the file tutorials.php possible<br>
>> > file operations.<br>
>> ><br>
>> > Is it now allowed to load data via RSS ?<br>
>> > So how can i load dynamic data without this ?<br>
>> ><br>
>> > Help is really appreciated.<br>
>> ><br>
>> > --<br>
>> > Regards<br>
>> > Qamar Ashraf<br>
>> > Project Manager<br>
>> > <a href="http://www.tutorialchip.com" target="_blank">www.tutorialchip.com</a><br>
>> > <a href="http://www.freestockphotosclub.com" target="_blank">www.freestockphotosclub.com</a><br>
>> > <a href="http://www.twunfollowapp.com" target="_blank">www.twunfollowapp.com</a><br>
>> > @lifeobject1<br>
>> ><br>
>> > _______________________________________________<br>
>> > theme-reviewers mailing list<br>
>> > <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
>> > <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
>><br>
>> _______________________________________________<br>
>> theme-reviewers mailing list<br>
>> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
>> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
><br>
><br>
><br>
> --<br>
> Regards<br>
> Qamar Ashraf<br>
> Project Manager<br>
> <a href="http://www.tutorialchip.com" target="_blank">www.tutorialchip.com</a><br>
> <a href="http://www.freestockphotosclub.com" target="_blank">www.freestockphotosclub.com</a><br>
> <a href="http://www.twunfollowapp.com" target="_blank">www.twunfollowapp.com</a><br>
> @lifeobject1<br>
><br>
> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
> <a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
My Blog: <a href="http://www.pross.org.uk/" target="_blank">http://www.pross.org.uk/</a><br>
Plugins : <a href="http://www.pross.org.uk/plugins/" target="_blank">http://www.pross.org.uk/plugins/</a><br>
Themes: <a href="http://wordpress.org/extend/themes/profile/pross" target="_blank">http://wordpress.org/extend/themes/profile/pross</a><br>
</font><div><div></div><div>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div class="im"><font color="#666666">Regards</font><div><font color="#666666">Qamar Ashraf</font></div><div><font color="#666666">Project Manager</font></div>
<div>
<font color="#666666"><a href="http://www.tutorialchip.com" target="_blank">www.tutorialchip.com</a></font></div><div><font color="#666666"><a href="http://www.freestockphotosclub.com" target="_blank">www.freestockphotosclub.com</a></font></div>
<div><a href="http://www.twunfollowapp.com" target="_blank">www.twunfollowapp.com</a></div><div><font color="#666666">@lifeobject1</font></div><br>
</div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div>