Thanks for the tip

looking it over now. Do I need to use something like this to handle namespaces

$s->register_ns('nutch', 'http://www.nutch.org/opensearchrss/1.0/');
$s->register_ns('opensearch', 'http://a9.com/-/spec/opensearchrss/ 1.0/');

--- I tried this put did not pull data I have to comment out the name space -- And XPATH part via xsearch is not showing up.

<?php

$contents=file_get_contents('http://140.254.84.215:8080/opensearch? query=rose&hitsPerSite=2&hitsPerPage=10'); //fetch RSS feed

$s = new SimpleXMLElement($contents);
//$s->register_ns('nutch', 'http://www.nutch.org/opensearchrss/1.0/');
//$s->register_ns('opensearch', 'http://a9.com/-/spec/opensearchrss/ 1.0/');
//$s->register_ns('rss', 'http://purl.org/rss/1.0/');

print $s->channel->title . "\n";
foreach ($s->xsearch('//title') as $title) {
    print "$title\n";
}
$sites = $s->xsearch('//item/nutch:site');

foreach ($sites as $site) {
    print "$site\n";
}

?>







On Oct 30, 2006, at 4:28 AM, Jacob Brunson wrote:

MagpieRSS is fairly limited in the information it can pull out of a
feed, so I suspect that it won't be able to pull out the opensearch
tags.  I would suggest if you are using PHP5 to use the SimpleXML
extensions to get at all the data instead of using Magpie.

On 10/27/06, Bud Witney <[EMAIL PROTECTED]> wrote:
Does anyone know of a way to get via php and magpie a RSS feed which
contains Opensearch Format tags and info.

Not sure how to get to the Nutch:site info for example.

Any example code would be much appreciated

I did see this on website but don't know how to implement.
_________________________________________________________

Reply via email to