CallbackURL Using Local Folder?

For discussion of the Poker Mavens server module and other administration topics
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

CallbackURL Using Local Folder?

Post by Tuck Fheman »

As is the CallbackURL afaict can only be a URL (http/https), but due to my setup now being on 2 servers and my callback file running some code that has to locate tournament history files locally on the same machine PM7 is running on ... that part of the code won't function properly now.

Reason being, I can't tell the "URL" field under Callback Events to find the callback file that runs that code on the local machine (that I can tell).

Example, I can't use : C:\folder\callbackfile.php in the CallbackURL.

If there is a way to do this, how?

In v6 I didn't have this issue, but for whatever reason (I've yet to figure out) in PM7 when I access the domain that PM is setup on it goes directly to the poker server and I can't call up any website or other folder from the same server any longer (I've tried 2 different servers and domains with the same result).
Kent Briggs
Site Admin
Posts: 5580
Joined: Wed Mar 19, 2008 8:47 pm

Re: CallbackURL Using Local Folder?

Post by Kent Briggs »

The Callback system works the same as before. A php file is executable code so it has to be paired with a web server that is called via http, which in turn calls the PHP program that feeds the output back to the web server. Poker Mavens cannot execute php files (at least not currently). You can run a webserver on the same machine but it has to use different ports than the poker server. That's probably the difference you are seeing. If you ran v6 on its default 8087 port then that left port 80 available for your web server. But if you are using port 80 in v7 then you cannot run the webserver on 80.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: CallbackURL Using Local Folder?

Post by Tuck Fheman »

Kent Briggs wrote: Fri Apr 15, 2022 11:36 pm The Callback system works the same as before. A php file is executable code so it has to be paired with a web server that is called via http, which in turn calls the PHP program that feeds the output back to the web server. Poker Mavens cannot execute php files (at least not currently).
Yeah, that makes sense, I didn't even think about the php not being able to run calling it locally like that.
Kent Briggs wrote: Fri Apr 15, 2022 11:36 pm If you ran v6 on its default 8087 port then that left port 80 available for your web server. But if you are using port 80 in v7 then you cannot run the webserver on 80.
We ran v6 on file port 2083 and packet port 2087.

But on the same server with v7 using HTTP port 2083 and WS port 2087 we get this result where PM loads up instead of the website.

PMv7 has the new settings HTTPS port and that's on 443 and WSS port and that's on 8443, which I believe are the defaults.

PMv6 didn't have those settings afaik, what ports did it use for HTTPS and WSS by default?
Kent Briggs
Site Admin
Posts: 5580
Joined: Wed Mar 19, 2008 8:47 pm

Re: CallbackURL Using Local Folder?

Post by Kent Briggs »

Tuck Fheman wrote: Sat Apr 16, 2022 1:58 am We ran v6 on file port 2083 and packet port 2087.
But on the same server with v7 using HTTP port 2083 and WS port 2087 we get this result where PM loads up instead of the website.
PMv7 has the new settings HTTPS port and that's on 443 and WSS port and that's on 8443, which I believe are the defaults.
PMv6 didn't have those settings afaik, what ports did it use for HTTPS and WSS by default?
Unlike PM 7, PM 6 could not bind to SSL and non-SLL ports at the same time. You had to pick one or the other. If you are not using port 80 in PM 7 then should probably not be using 443 either. Because a web server uses 80 for http connections and 443 for https connections by default. Either give PM 7 the default ports or your web server the default ports but don't split them like that unless you have a good reason for it.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: CallbackURL Using Local Folder?

Post by Tuck Fheman »

We're still trying to get this sorted out, but in the meantime ...

Is there a way to obtain the ITM players names, amount won, place finished without reading the tourney results file?

I know we're currently grabbing handhistory results on the fly via the API, so I'm just curious if the above is also possible via the API and if so, what call(s) would we use?
Kent Briggs
Site Admin
Posts: 5580
Joined: Wed Mar 19, 2008 8:47 pm

Re: CallbackURL Using Local Folder?

Post by Kent Briggs »

Tuck Fheman wrote: Sun Apr 17, 2022 8:09 pm Is there a way to obtain the ITM players names, amount won, place finished without reading the tourney results file?
I know we're currently grabbing handhistory results on the fly via the API, so I'm just curious if the above is also possible via the API and if so, what call(s) would we use?
The TournamentsResults command in the API fetches the tournament results files. When you say "without reading" do you just mean manually?
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: CallbackURL Using Local Folder?

Post by Tuck Fheman »

Kent Briggs wrote: Sun Apr 17, 2022 8:34 pm The TournamentsResults command in the API fetches the tournament results files. When you say "without reading" do you just mean manually?
I mean without being able to access the actual results TXT file.
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: CallbackURL Using Local Folder?

Post by Tuck Fheman »

I know this is outside the scope of "support" ;) ... but if you feel like answering this I'd appreciate it.

So would it be possible to use the TournamentsResults API command to somehow grab the ITM players names and amounts won to use within some calculations code for players points?

I'm no developer, but I have learned a little PHP and currently we're getting this information by reading the actual tourney results txt files.

But I know TournamentsResults is what we use to display the same information on the Tourney Results page on our site and it's not actually fetching the results txt files in the code, it's just using the API TournamentsResults call to get that info and display a list by date which then pulls up the info within the txt file to display to the user.

So, if I'm able to get the tourney results with a call to TournamentsResults in the API, is it also possible to pull out information from what is retreived or is it simply used to post the full results?

I apologize if none of this makes sense, I have no idea how to ask what I'm trying to figure out. :( I have no clue how all of this work lol, so I'm struggling to grasp it all. But usually with enough time I can shitcode something up to make things work if I can get a general idea of how it's all working and find some existing code to piece together.

Thanks
Kent Briggs
Site Admin
Posts: 5580
Joined: Wed Mar 19, 2008 8:47 pm

Re: CallbackURL Using Local Folder?

Post by Kent Briggs »

Tuck Fheman wrote: Wed Apr 20, 2022 4:00 am So, if I'm able to get the tourney results with a call to TournamentsResults in the API, is it also possible to pull out information from what is retreived or is it simply used to post the full results?
The TournamentsResult command in the API is literally just sending back the raw text file that you see saved in data folder. What your code would typically do is loop through that line by line looking for the info you are interested in, using the various string commands available in PHP or whatever language you are using. For example:

Code: Select all

Tournament=50 Freeroll + Single Rebuy [Buyin: 0]
Number=1875
Currency=Primary
BuyIn=0+0
Bounty=0
PrizeBonus=50
MultiplyBonus=No
Entrants=5
Uniques=5
Late=1
Tickets=0
Removed=0
Rebuys=0
AddOns=0
RebuyCost=5+0
NetBonus=50
AutoChop=No
PlayerChop=Yes
Start=2022-03-29 16:38:30
Place5=pm2 (10) Paid:0 Rebuys:0 KO:pm2
Place4=pm5 (10) Paid:0 Rebuys:0 KO:pm5
Place3=pm1 (10) Paid:0 Rebuys:0 KO:pm1
Place2=pm3 (10) Paid:0 Rebuys:0 KO:pm3
Place1=pm4 (10) Paid:0 Rebuys:0 KO:pm4
Stop=2022-03-29 16:39:52
If I just want a list of players and where they finished, I would loop through file until I hit a line that started with "Start=". Then I know the next lines are all going to start with "Place" until I hit a line that starts with "Stop=". Each time I reach a "Place" line I look at the number that comes after "Place" and before the "=". Then I know the players name will come next followed by a space. So you just work your way down the string looking for markers where you can find the data to extract in between.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: CallbackURL Using Local Folder?

Post by Tuck Fheman »

Kent Briggs wrote: Wed Apr 20, 2022 9:36 am The TournamentsResult command in the API is literally just sending back the raw text file that you see saved in data folder.
So you're saying that it is saving that tourneys results in a text file on the remote server calling TournamentResults? If so, where is that stored on the remote server?

I was assuming it was just grabbing the info and writing it on the fly to the php page displayed in the viewers browser and wasn't actually stored on the remote server at all. If that is the case then that's great, I can get around this port issue that way.
Post Reply