exporting prizes won to another site

For discussion of the Poker Mavens server module and other administration topics
Post Reply
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

exporting prizes won to another site

Post 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?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: exporting prizes won to another site

Post 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.
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: exporting prizes won to another site

Post by social »

Thanks, Kent.
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: exporting prizes won to another site

Post 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...?????
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: exporting prizes won to another site

Post 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.
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: exporting prizes won to another site

Post 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?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: exporting prizes won to another site

Post 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.
Post Reply