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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:03:29+00:00 2026-05-20T23:03:29+00:00

I use cURL to get an rss feed from my own wordpress blog to

  • 0

I use cURL to get an rss feed from my own wordpress blog to display it as a “feed” sidebar and when I get the headers, all quotes appear as this : ’

The cURL code I use to get that is:

$ch = curl_init($feed_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_TRANSFERTEXT, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_HEADER, false);
$content = curl_exec($ch);

The strange thing is that in my local server, it brings the quotes ok, but on the remote, it returns this seq.

The code I use to print out the “Feed” follows:

$x = new SimpleXmlElement($content);
    foreach ($x->channel->item as $entry) {
        echo "<li class='newsLI'><a href='$entry->link' title='$entry->title'>" . $entry->title . "</a></li>";
    }

and what I get, can be clearly seen in the bottom left side of the screen here:
http://www.inlinkz.com

Any ideas on where to start looking for an answer?

Thanks in advance!

  • 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-20T23:03:29+00:00Added an answer on May 20, 2026 at 11:03 pm
    1. You don’t have a DOCTYPE defined
    2. You aren’t setting the page’s content-type

    Adding the following lines to your code solved your problem (at least on my machine ;)):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    (of course, this should be set to whatever definition you’re actually using)

    <meta http-equiv="content-type"
    content="text/html;charset=utf-8" />

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

Sidebar

Related Questions

I'm trying to use curl to get some data from the web. What I
I found sometimes browser can't get cookies from my website, so I use curl
I want to use curl to get a stream from a remote server, and
i use curl to get the data (http request) from a website through php.
How to get html source code from https? I try to use curl instead
When I try to use curl command in my shell script I get the
I want to use curl to retrieve a table from an external page. So
I use cURL library to get the content of current URL. So I wonder,
I need to get webpage's content ,I cant use Curl as it is not
I have some code that does something like this pseudocode: Use CURL to get

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.