Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unable to parse an xml hosted on a separate server

    Hello to all the experts out there,

    I can't seem to parse my xml file. I've my software export a xml file at a separate server and when i try to parse it it keeps giving me this error.

    Warning: simplexml_load_file(http://216.16.91.18:81/xml/kkck_fm.xml) [function.simplexml-load-file]: failed to open stream: Connection refused in /home/taggesem/public_html/parse.php on line 2

    Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://216.16.91.18:81/xml/kkck_fm.xml" in /home/taggesem/public_html/parse.php on line 2

    Fatal error: Call to a member function attributes() on a non-object in /home/taggesem/public_html/parse.php on line 3

    I'm using PHP to parse it and this works fine from my localhost. I've my the file I used to parse hosted at godaddy and the xml output is at http://216.16.91.18:81/xml/kkck_fm.xml

    Any help will be appreciated.

  • #2
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heres the script that I'm using,...

    <?php
    $xml = simplexml_load_file('http://216.16.91.18:81/xml/kkck_fm.xml');
    $var = $xml->Entry[0]->attributes();
    $artist = $var->Artist;
    $title = $var->Title;
    echo "Artist : $artist<br />";
    echo "Title : $title<br />";
    ?>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •