db_selectOne("rss_feed","*","generated_url='".$_REQUEST["feed"]."'"); if($row===false) die("Incorrect feed ID"); if($row["often_check"]==0) $row["often_check"]=1; if($row["nb_items"]==0) $row["nb_items"]=100; if(isset($called_from_file)) { $row["content2"]=0; $row["updated"]=10; } if(time()-$row["updated"]>60*$row["often_check"] || trim($row["content2"])==="") { $row["domain_link"]=$domain_link; $row["actual_link"]=$actual_link; $row["name"]=mb_convert_encoding($row["name"], 'ISO-8859-1', 'UTF-8'); $row["description"]=mb_convert_encoding($row["description"], 'ISO-8859-1', 'UTF-8'); require_once(libDirectory."curl.php"); require_once(libDirectory."curlManager.php"); switch($row["type"]) { case "facebook":$row=get_fcebook_feed($row);break; case "twitter":$row=get_twitter_feed($row);break; default:$row=get_google_feed($row);break; } $item["updated"]=time(); //$item["content"]=utf8_encode($content); if($row["type"]=="facebook") { $item["content"]=utf8_encode($row["content"]); $str=$item["content2"]=utf8_encode($row["content2"]); } else { $item["content"]=$row["content"]; $str=$item["content2"]=$row["content2"]; } $db->db_update("rss_feed",$item,"id=".$row["id"]); } else { if($row["type"]=="google") $str=$row["content2"]; else $str=$row["content2"]; } if(!isset($called_from_file)) { header('Content-Type: application/xml; charset=utf-8'); die($str); } ?>