rss problem

Discussion in 'PHP' started by wiseboke, Nov 25, 2010.

  1. #1
    wiseboke, Nov 25, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    If you turn on error reporting you will have a better idea why. Its most likely your hosting provider has some functions switched off.

    Add this to rss.php just after <?php
    error_reporting(E_ALL);
    PHP:
     
    MyVodaFone, Nov 26, 2010 IP
  3. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Hi your rss output is incomplete and it has an error

    This page contains the following errors:

    error on line 4 at column 56: EntityRef: expecting ';'


    If you look into the source code of that page you will note something like this:

    <language>en-us</language>rss test

    why is rss-test outside of the XML tags ?

    also <channel> and <rss> tags are not closed (probably because the error above breaks the script)
     
    drctaccess, Nov 26, 2010 IP
  4. wiseboke

    wiseboke Peon

    Messages:
    133
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey I add "rss test" myself to see what is wrong
    that's not the problem,if I remove it,it still can't output correctly
    you can check it again,so such error now,but still don't outpu
     
    wiseboke, Nov 26, 2010 IP
  5. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #5
    can you provide the script (rss.php) so I can take a look?
     
    drctaccess, Nov 26, 2010 IP
  6. wiseboke

    wiseboke Peon

    Messages:
    133
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi I have just sent you a message with the script,thanks
     
    wiseboke, Nov 27, 2010 IP
  7. CarcaBot

    CarcaBot Active Member

    Messages:
    389
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Try to encode variables with htmlspecialchars like:

    $myvar = htmlspecialchars($myvar);

    then output xml.
     
    CarcaBot, Nov 28, 2010 IP
  8. wiseboke

    wiseboke Peon

    Messages:
    133
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hey thanks for your help,it works now after I simply add htmlspecialchars before TITLE ,although I still don't understand why
     
    wiseboke, Nov 29, 2010 IP