Before I went and did the "harder" part I simply included the required code for a RSS feed to be printed at my page, as in the last 10 posts made to my forum.
I did so at this page: http://snesorama.us/new_posts.php
However, as you can see, the page is completely empty, thus something is wrong, and it aint the path, as it doesn't give any 404 error either.
I sent this to technical staff aswell, but I just got a "I'm sorry, there's nothing more I can do for you".
Like I said, I made it the simple way, just to test it. I just pasted the needed code into a blank .php file, added the <? php> around the code, and added the echo statement at the bottom of it.
What am I doing wrong?
Edit: I just noticed this may have been posted at the wrong subforum, please move if needed.
Regards
//matrlx
I did so at this page: http://snesorama.us/new_posts.php
Code:
<?php // ###################################################### // ## configuration // ## // ## $rss_file= 'http://www.vbulletin.com/forum/external.php?type=rss'; // ## Adjust this variable to point to your RSS feed $rss_file = 'http://snesorama.us/board/external.php?type=rss'; // ## configuration end // ###################################################### // ## Do not touch code below! $is_item = false; $tag = ''; $title = ''; $description = ''; $link = ''; function character_data($parser, $data) { global $is_item, $tag, $title, $description, $link; if ($is_item) { switch ($tag) { case "TITLE": $title .= $data; break; case "DESCRIPTION": $description .= $data; break; case "LINK": $link .= $data; break; } } } function begin_element($parser, $name) { global $is_item, $tag; if ($is_item) { $tag = $name; } else if ($name == "ITEM") { $is_item = true; } } function end_element($parser, $name) { global $is_item, $title, $description, $link, $rss_output; if ($name == "ITEM") { $rss_output .= "<dt><strong><a href='" . trim($link) . "'>" . htmlspecialchars(trim($title)) . "</a></strong></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>"; $title = ""; $description = ""; $link = ""; $is_item = false; } } $parser = xml_parser_create(); xml_set_element_handler($parser, "begin_element", "end_element"); xml_set_character_data_handler($parser, "character_data"); $fp = fopen($rss_file,"r"); while ($data = fread($fp, 4096)) { xml_parse($parser, $data, feof($fp)); } fclose($fp); xml_parser_free($parser); echo $rss_output; ?>
I sent this to technical staff aswell, but I just got a "I'm sorry, there's nothing more I can do for you".
Like I said, I made it the simple way, just to test it. I just pasted the needed code into a blank .php file, added the <? php> around the code, and added the echo statement at the bottom of it.
What am I doing wrong?
Edit: I just noticed this may have been posted at the wrong subforum, please move if needed.
Regards
//matrlx
Comment