是否有可能加載xml會減慢我的網站?loading xml放慢我的網站
我在PHP寫這個小功能來遍歷字符串數組來計算我的追隨者總量
function getFeedCount() {
foreach ($array as $value) {
$xml = simplexml_load_file("http://api.feedburner.com/awareness/1.0/GetFeedData?uri=$value")
or die ("Unable to load XML file!");
$circulation += $xml->feed->entry['circulation'];
}
return $circulation;
}
數組是約10項大的,因爲我開始使用它,它真的放慢了我的網站。
我能做些什麼來解決這個問題。
沿着這些路線,你可能會檢查feedburner api的TOS,看看他們是否在任何時候加油。 – NotMe 2010-05-21 16:34:41