SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS feed not showing in Chrome

    Hi Guys,

    I've built an RSS feed but it just wont work in Chrome. The BBC RSS feed works fine in Chrome so it's not the browser. Here is a snippet of the RSS output. Am I missing anything?

    PHP Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
    <title>JobBoardScripts Search Results</title>
    <description>RSS Feed for JobBoardScripts Search</description>
    <link>http://www.domain.co.uk</link>
    <atom:link href="http://www.domain.co.uk/rss/rss.php" rel="self" type="application/rss+xml" />
    <item>
    <title><![CDATA[Accounts Payable Officer ]]></title>
    <description><![CDATA[
        Job title: Accounts Payable Officer 

        Salary range: &pound;22- &pound;26k 

        Direct reports: None 

        Purpose of the role 

        Reporting to the Finance Manager the purpose of this role is to provide a full purchase ledger function within a busy Finance team. The Accounts Payable Officer will also be required to manage the small Corporate sales ledgers.

        Candidate profile 

        The succe...]]></description>
    <link><![CDATA[http://www.domain.co.uk/company/mp-resourcing/accounts-payable-officer-3147.html]]></link>
    <guid>http://www.domain.co.uk/company/mp-resourcing/accounts-payable-officer-3147.html</guid>
    <pubDate>Wed, 12 Feb 2014 19:45:14 +0000</pubDate>
    </item>
    <item>
    <title><![CDATA[Assistant Content Editor ]]></title>
    <description><![CDATA[
        Job title: Assistant Content Editor 

        Salary:&pound;17,000 

        Reporting to: Content Editor 

        Location: Wallingford

        Purpose of the role 

        The purpose of this role is to assist with editorial tasks in Content Management across a variety of subject areas to ensure relevant products and websites are updated regularly and content for further processing is identified as required.

        T...]]></description>
    <link><![CDATA[http://www.domain.co.uk/company/mp-resourcing/assistant-content-editor-3144.html]]></link>
    <guid>http://www.domain.co.uk/company/mp-resourcing/assistant-content-editor-3144.html</guid>
    <pubDate>Tue, 11 Feb 2014 18:48:15 +0000</pubDate>
    </item>
    <item>
    <title><![CDATA[Data Correction Operator (temp-to-perm)]]></title>
    <description><![CDATA[
        Data Correction Operator (temp-to-perm)

        Do you have highly accurate visual skills? Can you maintain a high level of focus in a busy environment? If you are this conscientious, meticulous and thorough person we are looking for, we would love to hear from you.

        This full-time position on an initial 2 month contract could convert to a permanent position depending on your performance (accura...]]></description>
    <link><![CDATA[http://www.domain.co.uk/company/mp-resourcing/data-correction-operator-temp-to-perm--3141.html]]></link>
    <guid>http://www.domain.co.uk/company/mp-resourcing/data-correction-operator-temp-to-perm--3141.html</guid>
    <pubDate>Mon, 10 Feb 2014 11:22:10 +0000</pubDate>
    </item>
    </channel>
    </rss>

  2. #2
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,441
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    Hi Zaggs,

    Quote Originally Posted by Zaggs View Post
    I've built an RSS feed but it just wont work in Chrome. The BBC RSS feed works fine in Chrome so it's not the browser. Here is a snippet of the RSS output. Am I missing anything?
    When you say it doesn't work in Chrome, are you getting any output at all? Or it's displaying the feed as plain text rather than xml?

  3. #3
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fretburner View Post
    Hi Zaggs,



    When you say it doesn't work in Chrome, are you getting any output at all? Or it's displaying the feed as plain text rather than xml?
    Yes it's just displaying the plain text rather than the XML...

  4. #4
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,441
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    Try setting the content type header (note that you have to call the header() function before you output anything from your script):
    PHP Code:
    header("Content-Type: application/rss+xml"); 

  5. #5
    SitePoint Wizard Zaggs's Avatar
    Join Date
    Feb 2005
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fretburner View Post
    Try setting the content type header (note that you have to call the header() function before you output anything from your script):
    PHP Code:
    header("Content-Type: application/rss+xml"); 
    Thanks, I thought this might have solved it - but still the same

  6. #6
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,441
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    Could you share the code you're using to generate the output, and maybe a link to see it in action (if it's online)?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •