Jump to content
Sign in to follow this  
samjsharples

Using xml feeds to display live odds on website

Recommended Posts

Hi

 

I'm looking for some advice on how to parse an xml feed and display any odds on my site

 

Here is an example http://feed.youwincdn.com/web/xml/en/youwin_football.xml

 

and as you can see it is quite large so calling it every time would have an impact on the server.

 

I am looking at using many different feeds in the future so want to start this properly and in a scaleable way.

I want to use php but open to any ideas on the best way to do this

 

Many thanks

Sam

Share this post


Link to post
Share on other sites

First, 3.4MB isn't a feed, it's a bad decision.

 

If you must deal with such a feed, pull it in with a cron, and store it on your server so you don't have to call it on every request. Call your cached version.

 

Do you need help with parsing? SimpleXML is super easy. Give it a shot and let us know when you get stuck.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.