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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:29:35+00:00 2026-06-05T06:29:35+00:00

I have to read an XML file that resides on Fitnesse Page. Let’s take

  • 0

I have to read an XML file that resides on Fitnesse Page.

Let’s take an example.

<?php
$url = http://localhost:9090/TestSuite.Fitnesse?Suite&Format=XML;
$xml=file_get_contents($url);
?>

My XML is in form of:

<xml version="some version">
<Results>
<name>Karan</name>
</Results>
...etc...

When I output the $xml on page, some strange numbers appears to come before each and every tag and output seems to be like

37 9 Karan 9f .........and so on....

When I checked the source of that webpage, the page containes the below code:

37 9
<?XML  Version="some version">
32
<Results>
32
<name>
45
Karan 
0f
</name>
and so on....

(I didn’t use the exact value, I can provide if needed).

Can anybody help me on this as I was not expecting these strange characters in output string.

  • 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-06-05T06:29:37+00:00Added an answer on June 5, 2026 at 6:29 am

    You need to have allow_fopen_url set in your server (php.ini) for this to work.

    If you don´t, then you can use this function as a replacement:

    <?php
    function curl_get_file_contents($URL)
        {
            $c = curl_init();
            curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($c, CURLOPT_URL, $URL);
            $contents = curl_exec($c);
            curl_close($c);
    
            if ($contents) return $contents;
                else return FALSE;
        }
    ?>
    

    this will require curl extension enabled in your php.ini

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

Sidebar

Related Questions

I currently have a php file that must read hundreds of XML files, I
I have to read/write an XML file that stores its data as bit masked
I am trying to read in an XML file that I have saved to
I have an XML file that I'm trying to read from here , and
I have a really simple XML file that I'm trying to read, but I
Respected All, I have to read XML file, for that I use SAXParser and
I am writing Perl script. In that I have to read log4j.xml file from
I have to read xml files that are accessibles through http with authentication. That's
I have the following xml file that I need to read into my C#
I have a 47mb XML file that I have to read over and over

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.