Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Scraping an XML Feed & Adding to User Profile?

@hnla

Participant

As a very skethcy outline of the top of my head you might follow something along these lines:

Using a custom xprofile field set in a new fieldgroup so that it didn’t appear on the main signup group ( or not as may be desired) you could have this field gather a user set url or portion of i.e if the feed url has a particular parameter to id the users WoW you could ask they supply that as a string for the custom field.

Now you have a unique value for this user you could try using simpleXml library to fetch and parse the feed, so using probably $xml_feed = simplexml_load_file() pass in the url of the feed plus the users xprofile field string to create an object specific to that user then you would simply need to render the parts of the feed you required $xml_feed->channel->item.

That is obviously a very patchy example, but in principle should be workable.

Skip to toolbar