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

  • Home
  • SEARCH
  • 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 712871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:53:49+00:00 2026-05-14T04:53:49+00:00

here is the page i want to parse (the api link i gave is

  • 0

here is the page i want to parse
(the api link i gave is just a dev test so its ok to be public)
http://api.scribd.com/api?method=docs.getList&api_key=2apz5npsqin3cjlbj0s6m

the output im looking for is something like this (for now)

 Doc_id: 29638658
 access_key: key-11fg37gwmer54ssq56l3
 secret_password: 1trinfqri6cnv3gf6rnl
 title: Sample
 description: k
 thumbnail_url: http://i6.scribdassets.com/public/images/uploaded/152418747/xTkjCwQaGf_thumbnail.jpeg
 page_count: 100

ive tried everything i can find on the internet but nothing works good. i have this one script

<?php
$xmlDoc = new DOMDocument();
$xmlDoc->load("http://api.scribd.com/api?method=docs.getList&api_key=2apz5npsqin3cjlbj0s6m");

$x = $xmlDoc->documentElement;
foreach ($x->childNodes AS $item) {
  print $item->nodeName . " = " . $item->nodeValue;
 }



 ?>

its output comes out like this:

#text = 
  resultset = 

      29638658
      key-11fg37gwmer54ssq56l3
      1trinfqri6cnv3gf6rnl

        Sample


        k

      http://i6.scribdassets.com/public/images/uploaded/152418747/xTkjCwQaGf_thumbnail.jpeg

        DONE

      100


      29713260
      key-18a9xret4jf02129vlw8
      25fjsmmvl62l4cbwd1vq

        book2


        description bla bla 

      http://i6.scribdassets.com/public/images/uploaded/153065528/oLVqPZMu3zhsOn_thumbnail.jpeg

        DONE

      7

  #text = 

i need major help im really stuck and dont know what to do. please please help me. thnx

  • 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-14T04:53:50+00:00Added an answer on May 14, 2026 at 4:53 am

    I recommend you load the XML data into a new SimpleXmlElement object as this will allow you to run xpath queries against the document.

    You will need to do a little research on how it works, but here’s a few pointers…

    Execute the xpath like so:

    // $xml is a SimpleXMLElement object
    $xml = simplexml_load_file('/path/to/file');
    $nodes = $xml->xpath('/xpathquery');
    

    A single / represents the root node (in your case rsp). A double slash represents any matching node. For example //title would return all titles. Each result of an xpath query is an array of SimpleXMLElements. You can get data from it like so:

    # Untested        
    $xml = simplexml_load_file('/path/to/file');
    $nodes = $xml->xpath('//result');
    
    foreach ($result as $node) {
        // Print out the value in title
        echo $node->title;
    }
    
    // Print out the amount of results
    echo $xml->rsp->attributes()->totalResultsAvailable;
    

    The final example with the results numbers may not work, but it is along those lines.

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

Sidebar

Related Questions

Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a
Here's the page: https://www.testmasters.net/test/ssltest2.aspx When I go to it (in firefox or chrome), it
Here's my scenario: I have a page containing several links; each link is meant
here's what I'm trying to do : On a page, I would have a
Here's what I have: Quarter Sheet Flyer (4 per page) as a PSD or
My master page contains a list as shown here. What I'd like to do
Here's the scenario: I have a textbox and a button on a web page.
Here is my SQLCommand object: oCommand.CommandText = INSERT INTO hits (id,client_id,client_ip,page,vars) VALUES _ (@@IDENTITY,@client_id,@ip,@page,@vars)
In my main page (call it index.aspx ) I call <%Html.RenderPartial(_PowerSearch, ViewData.Model);%> Here the
Database? Page variables? Enum? I'm looking for opinions here.

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.