set_time_limit(240);
ini_set("default_socket_timeout", 120);
if(isset($_GET["url"])) {
function eschtml($str) {
return str_replace(array(">", "<", "\""), array(">", "<", """), $str);
}
function remtags($str) {
$str = html_entity_decode($str, ENT_COMPAT, "UTF-8");
return strip_tags($str);
}
$url = $_GET["url"];
$detail = (isset($_GET["detail"]) ? intval($_GET["detail"]) : 2147483647);
$limit = (isset($_GET["limit"]) ? $_GET["limit"] : 2147483647);
$striphtml = (isset($_GET["striphtml"]) ? ($_GET["striphtml"] == "true") : false);
$showtitle = (isset($_GET["showtitle"]) ? ($_GET["showtitle"] == "true") : true);
$showtitledesc = (isset($_GET["showtitledesc"]) ? ($_GET["showtitledesc"] == "true") : false);
$titleprefix = (isset($_GET["titleprefix"]) ? $_GET["titleprefix"] : "");
$titlereplacement = (isset($_GET["titlereplacement"]) ? $_GET["titlereplacement"] : "");
$titledescprefix = (isset($_GET["titledescprefix"]) ? $_GET["titledescprefix"] : "");
$itemtitleprefix = (isset($_GET["itemtitleprefix"]) ? $_GET["itemtitleprefix"] : "");
$itemdescprefix = (isset($_GET["itemdescprefix"]) ? $_GET["itemdescprefix"] : "");
$showicon = (isset($_GET["showicon"]) ? ($_GET["showicon"] == "true") : false);
$showempty = (isset($_GET["showempty"]) ? ($_GET["showempty"] == "true") : false);
$type = (isset($_GET["type"]) ? $_GET["type"] : "php");
$fixbugs = (isset($_GET["fixbugs"]) ? ($_GET["fixbugs"] == "true") : false);
$forceutf8 = (isset($_GET["forceutf8"]) ? ($_GET["forceutf8"] == "true") : false);
if($type == "html") {
header("Content-Type: text/html; charset=utf-8");
echo "\n
\n
Use this tool to generate the code for RSS Feeds for the DFBA homepage.
The default values are preloaded, override at your own risk and discretion.
Styling the output
The HTML generated by this code contains CSS hooks so you can style the output in your stylesheet.
The title of the feed is displayed in a <h3>
tag, with the class feed-title
.
The feed description is displayed in a <p>
tag with class feed-desc
.
The feed icon is displayed in an <img>
tag with class feed-title-image
.
Each feed item title is displayed in a <h4>
tag with class feed-item-title
.
Each feed item description is displayed in a <p>
tag with class feed-item-desc
.
Note that this code does not generate HTML for empty feed titles, descriptions, etc.
If you want empty HTML to be generated, click "more options" and tick the "Output HTML for empty..." checkbox.
}
?>