Hi Guys,
I'm using wamp on my local machine for testing with, I've found a basic tutorial I'm following and the code works fine on the webspace I've got but it doesn't fucntion correnctly using wamp so I think the problem is with the setup for wamp on my machine.
The tutorial is here - http://www.w3schools.com/php/php_ajax_rss_reader.asp, it's the php page getrss.php which has the problem.
The bit of the code that seems to have the problem is this:
It gets to the line
and then seems to output all the code following the ->
On my website though, the code seems to work fine - http://whoracle.com/rsstest/getrss.php
When running the file through wamp I get the output:
(it goes on to display the rest of the code)
I'm expecting there may be a setting that is different or an extension mising or not enabled but I don't know where to begin looking. Any help would be appreciated
I'm using wamp on my local machine for testing with, I've found a basic tutorial I'm following and the code works fine on the webspace I've got but it doesn't fucntion correnctly using wamp so I think the problem is with the setup for wamp on my machine.
The tutorial is here - http://www.w3schools.com/php/php_ajax_rss_reader.asp, it's the php page getrss.php which has the problem.
The bit of the code that seems to have the problem is this:
PHP:
<?php
$xml=("http://news.google.com/news?ned=us&topic=h&output=rss");
$xmlDoc = new DOMDocument();
$xmlDoc->load($xml);
//get elements from "<channel>"
$channel=$xmlDoc->getElementsByTagName('channel')->item(0);
;
It gets to the line
PHP:
$xmlDoc->load($xml);
On my website though, the code seems to work fine - http://whoracle.com/rsstest/getrss.php
When running the file through wamp I get the output:
PHP:
load($xml); //get elements from "" $channel=$xmlDoc->getElementsByTagName('channel')->item(0);
I'm expecting there may be a setting that is different or an extension mising or not enabled but I don't know where to begin looking. Any help would be appreciated
