Can someone please please help me. Ive written some code, (see below). This code reads in an xml file and then displays 5 titles which are hyperlinked. It works fine on my test server but as soon as i upload it to my live server it doesnt work. I believe its because my live server is php4.
# <?php
#
# $objDOM = new DOMDocument();
# $objDOM->load("http://www.fccuk.org/forum/cache/global_rss4.xml");
# $item = $objDOM->getElementsByTagName("item");
# $coumt = 0
#
# foreach( $item as $value )
# {
# if($count <=5) {
# $title = $value->getElementsByTagName("title");
# $f_title = $title->item(0)->nodeValue;
# $link = $value->getElementsByTagName("link");
# $f_link = $link->item(0)->nodeValue;
#
# echo "$f_title $f_link <br>";
# }
# }
#
#
# ?>
Can someone please help me convert this to php4? I think i need to code it without using the DOM classes. Im new to php and have looked around on the net but have had no joy in changing my code.
Any help would be greatly appriciated!!
Thanks
Mario
# <?php
#
# $objDOM = new DOMDocument();
# $objDOM->load("http://www.fccuk.org/forum/cache/global_rss4.xml");
# $item = $objDOM->getElementsByTagName("item");
# $coumt = 0
#
# foreach( $item as $value )
# {
# if($count <=5) {
# $title = $value->getElementsByTagName("title");
# $f_title = $title->item(0)->nodeValue;
# $link = $value->getElementsByTagName("link");
# $f_link = $link->item(0)->nodeValue;
#
# echo "$f_title $f_link <br>";
# }
# }
#
#
# ?>
Can someone please help me convert this to php4? I think i need to code it without using the DOM classes. Im new to php and have looked around on the net but have had no joy in changing my code.
Any help would be greatly appriciated!!
Thanks
Mario