- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
75 lines
1.8 KiB
PHP
Executable File
75 lines
1.8 KiB
PHP
Executable File
<?php
|
|
require_once("includes.php");
|
|
|
|
|
|
|
|
ini_set('display_errors', 1);
|
|
ini_set('display_startup_errors', 1);
|
|
error_reporting(E_ALL);
|
|
$domain_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
|
|
$actual_link = $domain_link.$_SERVER["REQUEST_URI"];
|
|
|
|
|
|
if(!isset($_REQUEST["feed"]) || $_REQUEST["feed"]=="")
|
|
die("Feed ID is null");
|
|
$row=$db->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);
|
|
}
|
|
|
|
?>
|