accountcsv.php

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

accountcsv.php

Post by Tuck Fheman »

Where is accountcsv.php supposed to reside at?

I have the API working but can't figure out how to run accountcsv.php or stats.php properly, keep getting a Connection Refused error running on same machine.

I know it's something simple that I've missed as has been the case with everything else so far, but I can't figure it out, I'm a complete noob when it comes to PHP.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: accountcsv.php

Post by Kent Briggs »

Are you referring to the PHP examples from this page?

http://www.briggsoft.com/docs/pmavens/API_Examples.htm

You put them on a web server that has PHP installed and running.
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Post by Tuck Fheman »

Kent Briggs wrote:Are you referring to the PHP examples from this page?

http://www.briggsoft.com/docs/pmavens/API_Examples.htm

You put them on a web server that has PHP installed and running.

Yeah I copied the source from that page into a .php file but not matter what folder I try to execute it from it gives the "Connection refused" error, same with stats.php.

What folder are these files supposed to reside in?

I connect fine to the API with your utility and by using http, but yet to get those two php files going. =/
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: accountcsv.php

Post by Kent Briggs »

Tuck Fheman wrote:Yeah I copied the source from that page into a .php file but not matter what folder I try to execute it from it gives the "Connection refused" error, same with stats.php.
Do you have the API.php file in the same folder and did you edit that file so that the $url and $pw parameters are pointing to your poker server?
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Post by Tuck Fheman »

Kent Briggs wrote:
Tuck Fheman wrote:Yeah I copied the source from that page into a .php file but not matter what folder I try to execute it from it gives the "Connection refused" error, same with stats.php.
Do you have the API.php file in the same folder and did you edit that file so that the $url and $pw parameters are pointing to your poker server?
I am 99% sure that is the case, but I will try again tonight.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: accountcsv.php

Post by Kent Briggs »

Tuck Fheman wrote:I am 99% sure that is the case, but I will try again tonight.
Is the PHP code on the same server as the poker software or located on a different host? If it's on a different host and your file port is anything other than 80 then the likely cause is that third-party host has an outbound firewall blocking the API call.
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Post by Tuck Fheman »

Kent Briggs wrote:
Tuck Fheman wrote:I am 99% sure that is the case, but I will try again tonight.
Is the PHP code on the same server as the poker software or located on a different host? If it's on a different host and your file port is anything other than 80 then the likely cause is that third-party host has an outbound firewall blocking the API call.
Same server.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: accountcsv.php

Post by Kent Briggs »

Tuck Fheman wrote:Same server.
Then you should be able to connect to localhost without issue.

$url = "http://127.0.0.1:8087/api";

Replace 8087 with your actual File Port value if different and "api" with your actual API path if different.
Tuck Fheman
Posts: 213
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Post by Tuck Fheman »

Kent Briggs wrote:
Tuck Fheman wrote:Same server.
Then you should be able to connect to localhost without issue.

$url = "http://127.0.0.1:8087/api";

Replace 8087 with your actual File Port value if different and "api" with your actual API path if different.

I tried that as well last night with no luck. I'm hiring a Dev soon so hopefully he can figure it out.

One thing I see though is that there is no /api folder anywhere (if there is supposed to be one), even though that's where it's pointed in setup.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: accountcsv.php

Post by Kent Briggs »

Tuck Fheman wrote:One thing I see though is that there is no /api folder anywhere (if there is supposed to be one), even though that's where it's pointed in setup.
The API path is just an internal setting you can adjust here:

System tab -> Server Settings -> API path

The default value is "api" but you can change it for security purposes if you want. Just make sure your code matches it.
Post Reply