Web Analytics Made Easy -
StatCounter unable to parse an xml hosted on a separate server - CodingForum

Announcement

Collapse
No announcement yet.

unable to parse an xml hosted on a separate server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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 />";
    ?>

    Comment

    Working...
    X