Forum Moderators: coopster & phranque

Message Too Old, No Replies

Using ah-ha xml feeds

Is there a ready made script?

         

mack

7:05 pm on Jan 4, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I have been accepted to use Ah-ha feeds on my site. The problem being I was sent a link to am XML feed and dont know where to start. Does anyone know of a ready to roll script that can be used for this purpose?

Thanks in advance.

jeremy goodrich

7:08 pm on Jan 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd check out hotscripts or sourceforge, or perhaps freshmeat to see if there is something out there.

Haven't seen any scripts like that myself - but then, I haven't looked.

lorax

7:17 pm on Jan 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Mack,
Isn't the feed a ready made package of code you can copy and plug into your HTML file?

mack

4:49 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



what they supply is a page with a list of tags and a breif description of what each tag does.

It then gives me a URL where I will receive my results from. To some people in here this must seam so simple, but to me xml and php are my main downfalls.

I am assuming that php is the way to go with this and have the url for the results as a
require "url"
line on my code. Should the rest then be classes as variables? sorry for sounding to dumb but i really am lost on this one.

jeremy goodrich

4:56 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use PHP or Perl to grab and parse the XML feed on your own site. RSS feeds work something similar.

There must be a perl module XML something or other to do what you need - that, or a PHP function from php.net if that's the way you'd rather go.

The app you build fetches the XML on the fly, then parse the XML DOM for integration into your page. :)

Pretty, simple, really - sort of like SSI but from another server - and you have to 'format it' before using it.

Hope that helps a little...following the instructions with the server side scripting language of your choice for parsing XML will basically get you where you want to go - it's probably why you haven't got a better answer yet...though perhaps somebody will chime in with even more detail.

lorax

5:03 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ah... now I think I understand.

Ok, you'll need to visit [php.net...] to learn what to do with PHP.

Simply put. It sounds like they're leaving it up to you to parse the XML data into whatever format you want. They've given you the source info (the URL) and the list of tags used - and I assume a description of what each tag is and is used for.

Now you need to do some reading and playing. Use the above link for learning the PHP portion. For the XML - it depends upon how they're using XML.

Do you know if it's a raw XML document or an RDF/RSS feed or an XML-RPC? Did they mention SOAP by chance?

Hard to say for sure without reading their documentation.

mack

5:21 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks for the great link.

Dont supose you fancy doing it for me? lol

seriously though, guess this is whats it's all about, read and learn. I bought a php book today so I guess this will be my first project.

Im just questioning if this is going to be possible on my current server. I tested the Google web app a while back and this worked "used soap" so I think ah-ha should work if it uses the same components.

lorax

5:31 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To see if you have SOAP support installed, put up a PHP page with the following code:

<?php
phpinfo();
?>

It will give you a list of the PHP environment including all of the modules installed. Look for Pear SOAP.

Robber

1:05 pm on Jan 6, 2003 (gmt 0)

10+ Year Member



Before you get to far down with this make sure it works on your hosts set up.

Of course depends how you're going to do it, but if you decided to use php to parse xml and apply an xslt stylesheet I think the functions aren't that stable yet - although did I notice the latest version of php just released?