Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 989063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:43:55+00:00 2026-05-16T05:43:55+00:00

Upon transfering my site from one server to another, some functions started behaving differently.

  • 0

Upon transfering my site from one server to another, some functions started behaving differently.

The problem lies in building my rss feed. My feed are composed of database posts containing html, and to show them correctly in the feed I then need to change the picture paths to full domain paths, instead of just server root. For this purpose I use simple html dom (http://simplehtmldom.sourceforge.net).

When outputting the varaible html in Content-type: appilication/rss+xml it will show “Object id #1”. Should I choose to output it before setting content-type, I get the right html. (in this case < p >test< /p >)

How come I can’t output the variable html inside content-type rss+xml?

require_once($_SERVER['DOCUMENT_ROOT'].'/lib/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/functions/simple_html_dom.php');

$html = str_get_html("<p>test</p>");

foreach($html->find('img') as $e) {
    $e->src = $siteconfig['full_domain'].$e->src;       
}

header("Content-Type: application/rss+xml; charset=UTF-8");

$rssfeed = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$rssfeed .= "<rss version=\"2.0\">\n";
$rssfeed .= "<channel>\n";
$rssfeed .= "<title>Headline</title>\n";
$rssfeed .= "<language>da</language>\n";
$rssfeed .= "<item>\n\t";
$rssfeed .= "<description><![CDATA[".$html."]]></description>\n\t";
$rssfeed .= "</item>\n";
$rssfeed .= "</channel>\n";
$rssfeed .= "</rss>";

echo $rssfeed;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:43:56+00:00Added an answer on May 16, 2026 at 5:43 am

    try this:

    $rssfeed .= "<description><![CDATA[".$html->save()."]]></description>\n\t";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently transferring data from one database to another. My problem occurs with
Upon clicking on a link, I am bringing in some images from a JSON
I'm currently transfering some source code from a Subversion (SVN) repository to my client's
Upon visiting an older site it can be common to find deprecated tags and
Upon a certain user action, I wish to add to my UIViewController another UIView
Upon visiting the site that I'm currently working on you would immediately notice the
In a nutshell, this is my problem: private string publicKeyString = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVGUzbydMZS+fnkGTsUkDKEyFOGwghR234d5GjPnMIC0RFtXtw2tdcNM8I9Qk+h6fnPHiA7r27iHBfdxTP3oegQJWpbY2RMwSmOs02eQqpKx4QtIjWqkKk2Gmck5cll9GCoI8AUAA5e0D02T0ZgINDmo5yGPhGAAmqYrm8YiupwQIDAQAB; /* Some
Upon file upload, Coldfusion 8 returns: C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp12429.tmp did not contain a file. Does anyone
Upon doing my homework, I stumbled across a problem concerning Python and image manipulation.
I have a problem transferring ascii files from a Windows 7 machine to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.