Page 1 of 1

exporting prizes won to another site

Posted: Tue Oct 21, 2014 2:02 pm
by social
I need to export the prizes won in mtt tournaments and sitandgo tournaments for each player to an account that they have on another php/mysql site which tracks their winnings.

Can I get some guidance on what needs to be done, please, and how to do it?

Re: exporting prizes won to another site

Posted: Tue Oct 21, 2014 2:36 pm
by Kent Briggs
You can monitor the "Tournament finished" callback event. Use that to trigger code that retrieves the tournament result file via the TournamentsResults API call. Parse through that to get the prize chips awarded.

Re: exporting prizes won to another site

Posted: Tue Oct 21, 2014 3:24 pm
by social
Thanks, Kent.

Re: exporting prizes won to another site

Posted: Fri Oct 24, 2014 10:12 am
by social
Kent Briggs wrote:You can monitor the "Tournament finished" callback event. Use that to trigger code that retrieves the tournament result file via the TournamentsResults API call. Parse through that to get the prize chips awarded.
How does one "monitor the tournament finished callback event"?

Does that require setting up a cronjob on my server? Or...?????

Re: exporting prizes won to another site

Posted: Fri Oct 24, 2014 12:13 pm
by Kent Briggs
social wrote: How does one "monitor the tournament finished callback event"?

Does that require setting up a cronjob on my server? Or...?????
No cronjob needed, your script (hosted somewhere on your web site) will be called by the Poker Server. See the Callback Settings group on the System tab. Set "Enable callbacks" to Yes, specify a php file (or whatever) as the "URL". Set "Tournament Finish event" to Yes. See the yellow help bubble for the parameters sent which your script can read and act accordingly.

Re: exporting prizes won to another site

Posted: Sun Nov 09, 2014 9:48 am
by social
Kent Briggs wrote:
social wrote: How does one "monitor the tournament finished callback event"?

Does that require setting up a cronjob on my server? Or...?????
No cronjob needed, your script (hosted somewhere on your web site) will be called by the Poker Server. See the Callback Settings group on the System tab. Set "Enable callbacks" to Yes, specify a php file (or whatever) as the "URL". Set "Tournament Finish event" to Yes. See the yellow help bubble for the parameters sent which your script can read and act accordingly.
Thanks, Kent - that was helpful...
but there is a problem.
The Postback info for Tournament Finish Event is very useful, including a Time Stamp,
but the Tournament Results which are saved cannot be exactly matched up with that info because the
file names do not include the Time Stamp.

I assume that when your Help bubble for saving Tournament Results says "Tourney name" that it means the same thing as
the Tournament Finish event bubble, which says "Tournament name."

The problem arises with SitandGo and other recurring Tournaments which will have the same Tournament Name.

So, right now, my coder is telling me that all the Tournament Results on the same date will appear the same to the script which has been written to obtain the Chip Prize data.

I note that the Tournament Finish event Postback data includes a Tournament Number...
I gather this is *not* included in the Tournament Results file for each "tourney"?

Any suggestions that might solve my problem?

Re: exporting prizes won to another site

Posted: Sun Nov 09, 2014 10:30 am
by Kent Briggs
social wrote: I note that the Tournament Finish event Postback data includes a Tournament Number...
I gather this is *not* included in the Tournament Results file for each "tourney"?
Everything you need is included in those callback parameters: Name, Time, and Number. Number is definitely included in the tourney results file. Just open one up in a text editor and you'll see them. Extract the Date portion from the full Time stamp, use it and the Name in a call to TourneyResults in the API. Then scan the result for the matching Number (if there were multiple tournaments that day under the same name). The tourney numbers are sequential and thus always unique.