trying to parse an xml from a url and it wont work.

Posted by ida on Stack Overflow See other posts from Stack Overflow or by ida
Published on 2010-04-10T02:26:34Z Indexed on 2010/04/10 2:33 UTC
Read the original article Hit count: 377

Filed under:
|

this page shown an xml file and im trying to use simplexml to parse the data out and print it. what am i missing? cause all it does is show a blank page when i run it.

<?php
$url = "http://api.scribd.com/api?method=docs.getList&api_key=2apz5npsqin3cjlbj0s6m";

$xml = new SimpleXMLElement($url,NULL,true);

foreach($xml -> result as $value) {


    echo $value->doc_id."<br/>";
    echo $value->access_key."<br/>";
    echo $value->secret_password."<br/>";
    echo $value->title."<br/>";



}

?>

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml