Forums

General Betting

Welcome to Live View – Take the tour to learn more
Start Tour
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
Show More
Loading...
Report Getafix January 1, 2011 11:01 AM GMT
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
Report scrooge_mcduck January 1, 2011 11:06 AM GMT
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!
Report Getafix January 1, 2011 11:26 AM GMT
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)?
Report brendanuk1 January 1, 2011 11:45 AM GMT
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
Report Fred! January 1, 2011 1:34 PM GMT
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.
Report scrooge_mcduck January 1, 2011 5:35 PM GMT
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.
Post Your Reply
<CTRL+Enter> to submit
Please login to post a reply.

Wonder

Instance ID: 13539
www.betfair.com