بله حرفه شما درسته من عذر خواهی میکنم
ببینید من میخوام برای مثال از اینجا http://www.tabnak.ir/fa/rss/allnews rss بگیرم
الان که زدم 5 تا از خبر هارو بیاره ولی 3 تاشو آورد و زیرش این ارور رو داد:
Notice: Trying to get property of non-object in E:\xampp\htdocs\gog.php on line 40
Fatal error: Call to a member function item() on a non-object in E:\xampp\htdocs\gog.php on line 40
ولی برای گوگل کامل کار میکنه
سورس کد این سایتی که قرار دادم این است:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Tabnak.IR | تابناك</title>
<link>http://www.tabnak.ir</link>
<description>سايت خبري تحليلي تابناك</description>
<managingEditor>info@tabnak.ir</managingEditor>
<webMaster>info@iransamaneh.com</webMaster>
<lastBuildDate>Fri, 10 Feb 2012 09:44:30 +0330</lastBuildDate>
<generator>SepehrFeed V1.1</generator>
<item>
<title>جدیدترین پیام« اوباما » برای ایران ، در راه است</title>
<link>http://www.tabnak.ir/fa/news/225767/جدیدترین-پیام-اوباما-برای-ایران-در-راه-است</link>
<description>پیام های آمریکایی ها و به ویژه شخص رئیس جمهور این کشور به ایران ، به جای سفارت سوئیس از طریق دوستان مشترک دو کشور انتقال داده می شود ، روزی خبر می رسد که «داوود اغلو » پیام رسان بوده است و روزی هم «نوری مالکی» نخست وزیر عراق برای دادن این پیام انتخاب می شود</description>
<author>info@tabnak.ir</author>
<pubDate>10 Feb 2012 09:26:36 +0330</pubDate>
</item>
<item>
<title>در پشت پرده حوادث رومانی چه می گذرد ؟</title>
<link>http://www.tabnak.ir/fa/news/225606/در-پشت-پرده-حوادث-رومانی-چه-می-گذرد-</link>
<description>در روز های اخیر همه سقوط دولت رومانی را ناشی از مسائل اقتصادی می دانند ، اما در پشت پرده توافقاتی در این کشور صورت گرفته است که هر لحظه امکان دارد این توافقات در سایر کشورهای اروپای شرقی نیز رخ دهد ، به راستی در رومانی چه خبر است ؟</description>
<author>info@tabnak.ir</author>
<pubDate>10 Feb 2012 09:10:32 +0330</pubDate>
</item>
<item>
<title>چه کسی خود را سگ اعلیحضرت مینامید؟</title>
<link>http://www.tabnak.ir/fa/news/225752/چه-کسی-خود-را-سگ-اعلیحضرت-مینامید</link>
<description>شاه از ارتشبد نصیری خوشش میآمد چون نصیری خودش را سگ اعلیحضرت مینامید. اینکه او خود را چاکر مینامید از روی احترام بود و «چاکر» در فرهنگ فارسی از گذشتههای دور وجود داشته و برای عرض احترام و ارادت به کار میرفته و اکنون هم به کار میرود. اصولاً لفظ «چاکر» یک اصطلاح درباری بوده است. اما اینکه یک نفر خود را سگ بنامد برای ما قابل قبول نبود.</description>
<author>info@tabnak.ir</author>
<pubDate>10 Feb 2012 09:00:01 +0330</pubDate>
</item>
و برای گوگل :
<rss version="2.0"><channel><generator>NFE/1.0</generator><title>Top Stories - Google News</title><link>http://news.google.com/news?ned=us&hl=en&topic=h</link><language>en</language><webMaster>news-feedback@google.com</webMaster><copyright>&copy;2012 Google</copyright><pubDate>Fri, 10 Feb 2012 06:13:59 GMT</pubDate><lastBuildDate>Fri, 10 Feb 2012 06:13:59 GMT</lastBuildDate><image><title>Top Stories - Google News</title><url>http://www.gstatic.com/news/img/logo/en_us/news.gif</url><link>http://news.google.com/news?ned=us&hl=en&topic=h</link></image><item><title>Missed Super Bowl, Frantic Talks Led to $25 Billion Bank Deal - BusinessWeek</title><link>http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNGRNPQ0jAILvH1f5Tcj FnX4sz1PIg&url=http://news.businessweek.com/article.asp?documentKey%3D1376-LZ48JM07SXKX01-7HOSP40MF8NPDTB274JQ0RB8AA</link><guid isPermaLink="false">tag:news.google.com,2005:clust er=17593998987426</guid><category>Top Stories</category><pubDate>Fri, 10 Feb 2012 05:39:06 GMT</pubDate><description><table border="0" cellpadding="2" cellspacing="7" style="vertical-align:top;"><tr><td width="80" align="center" valign="top"><font style="font-size:85%;font-family:arial,sans-serif"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNFAr1Lg6xD4 0aEgrM4OjqJXX35Aug&amp;url=http://abcnews.go.com/Business/25-billion-mortgage-settlement-step/story?id%3D15548516"><img src="//nt0.ggpht.com/news/tbn/QNc1Xn_VNRc_yM/6.jpg" alt="" border="1" width="80" height="80" /><br /><font size="-2">ABC News</font></a></font></td><td valign="top" class="j"><font style="font-size:85%;font-family:arial,sans-serif"><br /><div style="padding-top:0.8em;"><img alt="" height="1" width="1" /></div><div class="lh"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNGRNPQ0jAIL vH1f5TcjFnX4sz1PIg&amp;url=http://news.businessweek.com/article.asp?documentKey%3D1376-LZ48JM07SXKX01-7HOSP40MF8NPDTB274JQ0RB8AA"><b>Misse d Super Bowl, Frantic Talks Led to $25 Billion Bank Deal</b></a><br /><font size="-1"><b><font color="#6f6f6f">BusinessWeek</font></b></font><br /><font size="-1">Feb. 10 (Bloomberg) -- Hashing out the $25 billion settlement reached by Bank of America Corp., JPMorgan Chase &amp; Co. and three other US banks with 49 states required missing some football. Bank executives, state officials and US Housing Secretary Shaun <b>...</b></font><br /><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNG1s6KwiZax JFUXdsu-YGHdFqpwwQ&amp;url=http://www.sfgate.com/cgi-bin/article.cgi?f%3D/g/a/2012/02/09/bloomberg_articlesLZ52WQ1A1I4H01-LZ5GO.DTL">$25 Billion Mortgage Agreement Doesn&#39;t Let U.S. Banks Off Hook</a><font size="-1" color="#6f6f6f"><nobr>San Frabarnamenevisco Chronicle</nobr></font></font><br /><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNHRxnQjSV_p vKyjgKgmKmqHzoPOQw&amp;url=http://bostonglobe.com/business/2012/02/10/settlement-step-forward-but-won-resolve-legal-cloud-over-banks-analysts-say/LNvdNglpd4ihz52utJRYxK/story.html">Banks still face mountain of lawsuits</a><font size="-1" color="#6f6f6f"><nobr>Boston Globe</nobr></font></font><br /><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNHnNfIiJFKf ry-2vqPDoT1Zd2Wlow&amp;url=http://seattletimes.nwsource.com/html/nationworld/2017470271_mortgage10.html">Deal to aid 1 million homeowners; won&#39;t solve housing market&#39;s ills</a><font size="-1" color="#6f6f6f"><nobr>The Seattle Times</nobr></font></font><br /><font size="-1" class="p"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNEMEaA265SV fZBeeDWxUGW5yQXIdA&amp;url=http://www.dailyfinance.com/2012/02/10/the-dow-little-movement-on-pretty-big-news/"><nobr>DailyFinance</nobr></a>&nbsp;-<a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNGP83tWDwDa nxPGpsr4OghbA67Mkw&amp;url=http://www.nytimes.com/2012/02/10/business/states-negotiate-26-billion-agreement-for-homeowners.html"><nobr>New York Times</nobr></a>&nbsp;-<a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;usg=AFQjCNGW_NS5HEqf Az6fgZgJx26DPJ5lQQ&amp;url=http://www.latimes.com/business/la-fi-0210-mortgage-banks-20120210,0,4761080.story"><nobr>Los Angeles Times</nobr></a></font><br /><font class="p" size="-1"><a class="p" href="http://news.google.com/news/more?ned=us&amp;topic=h&amp;ncl=do8QBwJxdT xNxyMcqRQzVIWsQPB_M"><nobr><b> all 2,836 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table></description></item>
ببخشید که یه ذره شلوغ بازی شد ولی میخواستم کامل توضیح بدم
البته این کد را از اینجا گرفتم : http://www.w3schools.com/php/php_ajax_rss_reader.asp