I'm getting the below error and can't figure out what I'm doing wrong??
I'm using php 5.2.9.9. This is what is in the PHP info file:
Quote:
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.7.3
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
|
Heres my code:
- <html>
-
<head>
-
<title>test</title>
-
-
</head>
-
<body>
-
<?php
-
$strRssFeed = "http://rss.cnn.com/rss/cnn_world.rss";
-
-
$xml = implode ('', file($strRssFeed));
-
-
$dom = domxml_open_mem($xml);
-
-
$root = $dom->document_element();
-
-
$title = $root->get_elements_by_tagname("title");
-
$desc = $root->get_elements_by_tagname("description");
-
$link = $root->get_elements_by_tagname("link");
-
-
for($i=0;$i<count($title);$i++)
-
{
-
echo "<p>";
-
echo "<a href=\"".$link[$i]->get_content()."\">".$title[$i]->get_content()."</a>";
-
echo "<br>".$desc[$i]->get_content();
-
echo "</p>";
-
}
-
?>
-
</body>
-
</html>
And heres the error in the apache logs:
Quote:
|
PHP Fatal error: Call to undefined function domxml_open_mem()
|