![]() |
|
Forum RSS feed not working! - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: General (https://sinister.li/Forum-General) +--- Forum: The Lounge (https://sinister.li/Forum-The-Lounge) +---- Forum: Random Discussion (https://sinister.li/Forum-Random-Discussion) +---- Thread: Forum RSS feed not working! (/Thread-Forum-RSS-feed-not-working) |
Forum RSS feed not working! - hacxx - 07-15-2018 In my atempt to make RSS feeds to email and then forward to a blog i create a blog just for hacking related forums and added the sinister.li RSS feed to it but wasn't working and no messages was delivered from sinister.li. Is there any block set in place to save resources? RE: Forum RSS feed not working! - Vultra - 07-15-2018 So, you're trying to redirect a link to sinister? Do you mind PMing me the link and I can have a look for you. RE: Forum RSS feed not working! - hacxx - 07-15-2018 (07-15-2018, 10:49 AM)Mimiakira Wrote: So, you're trying to redirect a link to sinister? No, i was testing only. I added the RSS Feed to RSSMix and forward to the blog. sinister.li uses MyBB and you can create a customizable RSS Feed in "RSS Syndication". (Link at the bottom.) https://sinister.li/misc.php?action=syndication You can select the categories that you want and how many posts you want to receive. RE: Forum RSS feed not working! - hacxx - 07-16-2018 Here is a print when trying to get the RSS Feed
RE: Forum RSS feed not working! - Vultra - 07-16-2018 (07-16-2018, 10:06 AM)hacxx Wrote: Here is a print when trying to get the RSS Feed Make sure there isn't any white space before the first tag. Try this: Code: <?php
set_time_limit(0);
//Declarations
$file = "data.txt"; //The file to read from.
#Read the file
$fp = fopen($file, "r") or die("Couldn't Open"); //Open the file
$FoundXmlTagStep = 0;
$FoundEndXMLTagStep = 0;
$curXML = "";
$firstXMLTagRead = false;
while(!feof($fp)) //Loop through the file, read it till the end.
{
$data = fgets($fp, 2);
if ($FoundXmlTagStep==0 && $data == "<")
$FoundXmlTagStep=1;
else if ($FoundXmlTagStep==1 && $data == "x")
$FoundXmlTagStep=2;
else if ($FoundXmlTagStep==2 && $data == "m")
$FoundXmlTagStep=3;
else if ($FoundXmlTagStep==3 && $data == "l")
{
$FoundXmlTagStep=4;
$firstXMLTagRead = true;
}
else if ($FoundXmlTagStep!=4)
$FoundXmlTagStep=0;
if ($FoundXmlTagStep==4)
{
if ($firstXMLTagRead)
{
$firstXMLTagRead = false;
$curXML = "<xm";
}
$curXML .= $data;
//Start trying to match end of xml
if ($FoundEndXMLTagStep==0 && $data == "<")
$FoundEndXMLTagStep=1;
elseif ($FoundEndXMLTagStep==1 && $data == "/")
$FoundEndXMLTagStep=2;
elseif ($FoundEndXMLTagStep==2 && $data == "x")
$FoundEndXMLTagStep=3;
elseif ($FoundEndXMLTagStep==3 && $data == "m")
$FoundEndXMLTagStep=4;
elseif ($FoundEndXMLTagStep==4 && $data == "l")
$FoundEndXMLTagStep=5;
elseif ($FoundEndXMLTagStep==5 && $data == ">")
{
$FoundEndXMLTagStep=0;
$FoundXmlTagStep=0;
#finished Reading XML
ParseXML ($curXML);
}
elseif ($FoundEndXMLTagStep!=5)
$FoundEndXMLTagStep=0;
}
}
fclose($fp); //Close file
function ParseXML ($xml)
{
//echo $sxml;
$reader = new XMLReader(); //Initialize the reader
$reader->xml($xml) or die("File not found"); //open the current xml string
while($reader->read()) //Read it
{
switch($reader->nodeType)
{
case constant('XMLREADER::ELEMENT'): //Read element
if ($reader->name == 'record')
{
$dataa = $reader->readInnerXml(); //get contents for <record> tag.
echo $dataa; //Print it to screen.
}
break;
}
}
$reader->close(); //close reader
}
?>RE: Forum RSS feed not working! - hacxx - 07-16-2018 Not useful, as it's not possible to use code with a RSS Feed client or on RSS Feed Service. RE: Forum RSS feed not working! - Vultra - 07-16-2018 (07-16-2018, 11:46 AM)hacxx Wrote: Not useful, as it's not possible to use code with a RSS Feed client or on RSS Feed Service. Well, I usually just type in the issue that i have. Many results shows the issue. |