A follow up,
I actually got my original code working now.
It so happened, it was the port issue. Somehow, using the same port could give you delay in queries.
$port = "81";
$connection = @fsockopen("$ip", $port, $errno, $errstr, $timeout)
$document = file("http://69.180.180.46:81/xml") were...
Hello Tom,
Well, what can I say. I get this error.
Sablotron error on line 1: XML parser error 4: not well-formed (invalid token)
http://www.stpaulairlines.com/testphp/xslt-transform.php
I have searched an answer for this error code in Google, and it seems like many people have this...
Hi Tom,
Thank you very much for the suggestion. I just did a quick look at it and it looks promising.
I will give this a try later tonight. Oh, the weather is so nice here in MN, finally spring is here.
Have a great weekend.
Regards,
Danzian
Hi,
I removed all the parse functions and I can confirm that the line $document = file("http://69.180.180.46:81/xml"); is the culprit.
I created a static xml file and called it using $document = file("onlineserver.xml"); and the web page loads instantly.
This is the page with static xml file...
Hi Tom,
Thank you very much for all your effort to help me.
I have to tell you one thing that the test.php is only a test page. It will be displayed on block like below:
I am not sure how I am going to call xslt file from that block. Perhaps I can use the RSS block.
I did try your code...
When comparing these two links:
http://www.stpaulairlines.com/testphp/test.php
http://www.stpaulairlines.com/testphp/test1.php
I moved the $document = file("http://69.180.180.46:81/xml"); command below two display commands.
As you can see, the loading of the xml file takes a lot of time...
XSLT is not really going to work for me at least with that tutorial.
The output data I get is in the raw format ie. ^^player_name^^, instead of the real name of the pilot. As you can tell I was working on the master xml.html file not the generated xml file.
First I need to fetch the data...
Apparently,
DOM objects do not run on my webhost. We have 4.4.2 php version, and still I do not know why.
In my personal apache server at home, the codes work flawlessly. I have PHP5.1.1 at home.
Well well.
Danzian
Thank you Tom for the quick reply.
I'm not very familiar with either XML or XSLT. I have read some articles about XSLT though. My understanding is that you need to have an XSLT file first in order to fetch the data. Am I right?
The server I'm getting data from does not have XSLT file, only...
Hello,
I'm new here and I'm totally new to XML. I have some experience in PHP but some other programming language.
I have read a tutorial to parse XML in PHP and successfully displayed the contents in the webpage using PHP, but I'm not really happy with the speed of loading of the page.
If I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.