Hi everyone
Quick question. I want to publish the output of an XML feed
http://www.w3schools.com/xml/simple.xml
to my website. I simply want a something readible for the users. Is this possible?
here is what I have so far but the page times out.
I have tested it using a local XML file and that works ok. I have checked the PHP value allow_url_fopen and that is enabled. Is there a solution to this? Thanks
Donal
Code:
<?php
$url = "http://www.w3schools.com/xml/simple.xml";
$fh = fopen($url, "r");
while(!feof($fh))
{
$output = htmlspecialchars(fgets($fh, 1024));
echo ("$output<br />");
}
fclose($fh);
?>
Quick question. I want to publish the output of an XML feed
http://www.w3schools.com/xml/simple.xml
to my website. I simply want a something readible for the users. Is this possible?
here is what I have so far but the page times out.
I have tested it using a local XML file and that works ok. I have checked the PHP value allow_url_fopen and that is enabled. Is there a solution to this? Thanks
Donal
Code:
<?php
$url = "http://www.w3schools.com/xml/simple.xml";
$fh = fopen($url, "r");
while(!feof($fh))
{
$output = htmlspecialchars(fgets($fh, 1024));
echo ("$output<br />");
}
fclose($fh);
?>