Jump to content

New To RSS


GRooVeZ

Recommended Posts

hi ive been writing my own RSS feed, and after a few hours i finally got the xml string to show correctly

 

after that i went to a rss validator, and fixed some other stuff, but now im stuck on the last 3

actually ive been to two and they both say different things

 

http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.acidleague.com%2FLeague%2Findex_rss.php

http://www.ivalidation.net/html.php?uri=http%3A%2F%2Fwww.acidleague.com%2FLeague%2Findex_rss.php

 

this is my file

<?php

 

header("Content-Type: application/xml; charset=ISO-8859-1");

 

 

$secure = new secure();

$secure->secureGlobals();

                 

 

 

$rssurl = 'http://www.acidleague.com/League/index_rss.php';

$rssname = 'AcID FFA RSS';

$rssdes = 'Free For All Matches Agenda';

$xml = '<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel>';

                                 

        $xml.='<title>'. $rssname .'</title><description>'. $rssdes .'</description><link>'. $rssurl .'</link>';           

        $query_items = "SELECT id FROM ffa_matches where status=0";                                                                     

        $result_items = mysql_query ($query_items) or die("Query failed with

        error: ".mysql_error());                             

 

            while($row = mysql_fetch_array($result_items))

            {           

                $result = $row[id];

$resultdate = $row[date]

$matchurl = 'http://www.acidleague.com/League/ffamatch.php?match=' . $result;

$xml .= '<item><title>'. $result .'</title><link>'. $matchurl .'</link><description>'. $resultdate.'</description></item>';

            }

 

   

 

        $xml .= '</channel>';

        $xml .= '</rss></xml>';

 

        echo $xml;                   

 

?>[code=php:0]

Link to comment
Share on other sites

sorry cant edit my first anymore, i quoted by accident

 

this is my most recent code

 

<?php

 

header("Content-Type: application/xml; charset=utf-8");

 

 

include("./includes/egl_inc.php");

$secure = new secure();

$secure->secureGlobals();

                 

 

 

$rssurl = 'http://www.acidleague.com/League/index_rss.php';

$rssname = 'AcID FFA RSS';

$rssdes = 'Free For All Matches Agenda';

$xml = '<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel>';

                                 

        $xml.='<title>'. $rssname .'</title><description>'. $rssdes .'</description><link>'. $rssurl .'</link>';           

        $query_items = "SELECT id,date FROM ffa_matches where status=0";                                                                     

        $result_items = mysql_query ($query_items) or die("Query failed with

        error: ".mysql_error());                             

 

            while($row = mysql_fetch_array($result_items))

            {           

                $result = $row[id];

$resultdate = $row[date];

$matchurl = $row[date];

$xml .= '<item><title>'. $result .'</title><link>'. $matchurl .'</link><description>'. $resultdate.'</description></item>';

            }

 

   

 

        $xml .= '</channel>';

        $xml .= '</rss></xml>';

 

        echo $xml;                   

 

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.