[uf-discuss] Parsing XFN in PHP
mail at ciaranmcnulty.com
Tue Apr 8 06:38:37 PDT 2008
On Tue, Apr 8, 2008 at 1:10 PM, Julian Bond <julian_bond at voidstar.com> wrote:
> I need some advice about reading rel="me" tags in arbitrary web pages using
> PHP. I'm intending to use this to help build a lifestream style function.
> The basic intent is to cut down the amount of data entry the user has to do.
> When they give me a MyBlogLog, Friendfeed, Plaxo Pulse page that has lists
> of links to their profile pages I should be able to avoid having to ask them
> for all of them again. So:-
> - User gives me a URL for one of their profile pages
> - Use Curl to collect the source
> - Parse the source looking for links with a rel="me"
> - Extract an array of Link URL - Link Text
> - Do something useful with the array. (???? followed by Profit!)
Have a look at the Google Social Graph API  - it doesn't query
things 'live', but because it's Google they can return all the results
in one response to your query, and it saves you spidering the site
yourself and worrying about all the complexity that would involve.
Alternatively, if you want to parse uFs in PHP, I believe hKit by Drew
McLellan  may have some @rel=me support?
More information about the microformats-discuss