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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:48:24+00:00 2026-05-28T14:48:24+00:00

So I have this private function: private function curl_get($url) { // Initiate the curl

  • 0

So I have this private function:

private function curl_get($url)
{
    // Initiate the curl session
    $ch = curl_init();

    // Set the URL
    curl_setopt($ch, CURLOPT_URL, $url);

    // Removes the headers from the output
    curl_setopt($ch, CURLOPT_HEADER, 0);

    // Return the output instead of displaying it directly
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

    // Execute the curl session
    $output = curl_exec($ch);

    // Close the curl session
    curl_close($ch);

    return $output;
}

And I use if for example with this link: http://www.metacafe.com/api/item/cb-xuFyGC0jJqPfhMoFnewj4Da_ZhHCz4L2/

now the problem is that doesn’t return all the data, all I get is this:

[data] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [version] => 2.0
                    [source] => Metacafe
                )

            [title] => Metacafe
            [channel] => SimpleXMLElement Object
                (
                    [title] => SimpleXMLElement Object
                        (
                        )

                    [link] => http://www.metacafe.com/watch/cb-GKeDVFevZxk_rNri_uz_K01azz3uV_ZZ/
                    [image] => SimpleXMLElement Object
                        (
                            [url] => http://s.mcstatic.com/Images/MCLogo4RSS.jpg
                            [link] => http://www.metacafe.com
                            [title] => Metacafe
                            [height] => 65
                            [width] => 229
                        )

                    [description] => SimpleXMLElement Object
                        (
                        )

                    [item] => SimpleXMLElement Object
                        (
                            [id] => cb-GKeDVFevZxk_rNri_uz_K01azz3uV_ZZ
                            [author] => CBS
                            [title] => Romney Concedes South Carolina Primary
                            [link] => http://www.metacafe.com/watch/cb-GKeDVFevZxk_rNri_uz_K01azz3uV_ZZ/romney_concedes_south_carolina_primary/
                            [rank] => 4.00
                            [category] => News & Events
                            [description] => SimpleXMLElement Object
                                (
                                )

                            [guid] => http://www.metacafe.com/watch/cb-GKeDVFevZxk_rNri_uz_K01azz3uV_ZZ/romney_concedes_south_carolina_primary/
                            [pubDate] => 18 hours ago +0000
                        )

                )

        )

Why isn’t it returning the description and the tags, which are pretty important to me?

  • 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-28T14:48:26+00:00Added an answer on May 28, 2026 at 2:48 pm

    It’s not due to curl but how SimpleXml handles CDATA:

    $xml = simplexml_load_string($stringFromCurl, 'SimpleXMLElement', LIBXML_NOCDATA);
    

    will interpret the CDATA as text nodes, see the XML constants on PNP.net

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

Sidebar

Related Questions

I have this Two Methods private function cacheAdd($id,$data) { $this->minicache->set($id,$data); } private function cacheGet($id)
I have a ComboBox with a label function like this one: private function fieldLabelFunction(item:Object):String
I have a function like this in actionscript3 private function uploadFile(event:MouseEvent):void { var uploader:URLRequest
I have this function... private string dateConvert(string datDate) { System.Globalization.CultureInfo cultEnGb = new System.Globalization.CultureInfo(en-GB);
I have this function in my generator. Private Sub AddBoundedValue(ByVal boundedValue As Object, ByVal
I have a function that loads in some XML that looks like this: private
I have the following simple function: private void EnableDisable941ScheduleBButton() { if (this._uosDepositorFrequency.Value != null)
I have an array of function callbacks, like this: class Blah { private var
i have a class of this kind Class Car { private $color; public function
Hello i have this method: private function findConnectedNodes(node:Node):Array{ var test_node:Node; var surrounding_nodes:Array = [];

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.