exporting prizes won to another site

For discussion of the Poker Mavens server module and other administration topics

exporting prizes won to another site

Postby social » Tue Oct 21, 2014 2:02 pm

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

Re: exporting prizes won to another site

Postby Kent Briggs » Tue Oct 21, 2014 2:36 pm

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3754
Joined: Wed Mar 19, 2008 8:47 pm

Re: exporting prizes won to another site

Postby social » Tue Oct 21, 2014 3:24 pm

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

Re: exporting prizes won to another site

Postby social » Fri Oct 24, 2014 10:12 am

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

Re: exporting prizes won to another site

Postby Kent Briggs » Fri Oct 24, 2014 12:13 pm

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3754
Joined: Wed Mar 19, 2008 8:47 pm

Re: exporting prizes won to another site

Postby social » Sun Nov 09, 2014 9:48 am

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

Re: exporting prizes won to another site

Postby Kent Briggs » Sun Nov 09, 2014 10:30 am

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3754
Joined: Wed Mar 19, 2008 8:47 pm


Return to Site Administration

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron