Forums

General Betting

There is currently 1 person viewing this thread.
scrooge_mcduck
01 Jan 11 10:50
Joined:
Date Joined: 24 Apr 08
| Topic/replies: 899 | Blogger: scrooge_mcduck's blog
Does anyone use the free API to get football fixtures in PHP?

I am using the betfair_get_all_markets function to get all GBR games and when there aren't many games the code works fine but on a full fixture day like today the code often hangs, tries to restart and eventually cuts out. If I take out the function to get games it runs in 2 seconds!

Anyone had this experience with the API and do you have any tips to get around this?

Thanks in advance

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
sort by:
Show
per page
Replies: 6
By:
Getafix
When: 01 Jan 11 11:01
I assume you don't know about the "free" version time/call restrictions?

http://bdp.betfair.com/index.php?option=com_content&task=view&id=36&Itemid=64
By:
scrooge_mcduck
When: 01 Jan 11 11:06
Yeh I know about this but the code has a 3 second delay in between each request too so this shouldn;t be a problem I don't think. Sometimes it works even with lots of games but often it won't. So frustrating!
By:
Getafix
When: 01 Jan 11 11:26
I don't use the function for which you quote, I suspect it is the size of the data being returned, probably that coupled with poor indexing betfair side? Are you able to call that api method asynchronously or on a seperate thread (if you aren't already)?
By:
brendanuk1
When: 01 Jan 11 11:45
is it php hanging or is php fine and its betfair call thats taking time? Socket time outs might be cause if returning large data sets
By:
Fred!
When: 01 Jan 11 13:34
When a PHP script exceeds permitted memory usage it can die in an unhelpful manner like this. You may be able to locate error logs on your system that would confirm it.

Check the memory_limit setting in your php.ini file. Current default is 128M

If yours is lower than raise it.
By:
scrooge_mcduck
When: 01 Jan 11 17:35
Thanks guys, the rest of the php code works fine and it's all actually working ok now there are less than 20 or so games to be returned.

Hopefully it will just be a case of increasing the memory limit like Fred suggests. I'll let you know if this solves it.

If it doesn't then I may use different files for different leagues/countries but I think it's GBR that causes the problem and you can't narrow the search on these markets I don't think.

Thanks again.
sort by:
Show
per page

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
‹ back to topics
www.betfair.com