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 7026355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:06:21+00:00 2026-05-28T00:06:21+00:00

I am reading this tutorial on fetching RSS feeds using PHP Simple XML. Reason

  • 0

I am reading this tutorial on fetching RSS feeds using PHP Simple XML.
Reason I wanna do it myself instead of WordPress plugin is because of lack of displaying images.
Using this tutorial I thought I was going to be able to go through nodes myself and display what I want but I am not even fetching data I need because it is enclosed within ![CDATA]:

 <description>
<![CDATA[
<img src="http://images.highspeedbackbone.net/SKUimages/small/m17-1023-main666-tmc.jpg"/><br/> The Microsoft Office Home and Business 2010 Product Key Card brings together the roles of managing a business, running a household and helping with ho
]]>
</description>

So I am after that img tag, but it’s not there using this code from tutorial:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://rss.linksynergy.com/promo.rss?promoid=3076&token=8c86517642801a8d4e1132xxxxxxxxxxxxxxxx35e66a3');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

$xml = new SimpleXMLElement($data);

Any suggestions welcome.

Thanks!

  • 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-28T00:06:22+00:00Added an answer on May 28, 2026 at 12:06 am

    Try this:

    $xml = new SimpleXMLElement($data, LIBXML_NOCDATA);
    

    This will parse CDATA-Elements into normal text nodes so you can access them like any other text with $xml['decription']

    See http://www.php.net/manual/en/simplexmlelement.construct.php for reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying out this tutorial for reading rss feeds with a php file
I was reading this tutorial for a simple PHP login system . In the
I'm learning by reading this tutorial: Link Here's the code: <?php require_once 'Zend/Loader.php'; class
I've been reading through this tutorial for using a SQLite database within an iPhone
I'm following this tutorial here: http://brenelz.com/blog/implementing-paging-using-php-and-jquery/ Here is what I have: http://eataustineat.com/testingfolder/ I've encountered
Bad idea mixing HTML and PHP? I was reading this tutorial and it seems
When I was reading this tutorial I noticed the following performance tip about using
In this tutorial I am reading , Dave Ward creates a page that shows
After reading this discussion and this discussion about using CrashRpt to generate a crash
I was reading this tutorial from the DNN website http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/2675/DotNetNuke-Skinning-101-Part-2.aspx I found the tutorial

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.