Page 1 of 2

accountcsv.php

Posted: Tue Jul 11, 2017 4:10 am
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.

Re: accountcsv.php

Posted: Tue Jul 11, 2017 9:35 am
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.

Re: accountcsv.php

Posted: Tue Jul 11, 2017 5:53 pm
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. =/

Re: accountcsv.php

Posted: Tue Jul 11, 2017 7:12 pm
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?

Re: accountcsv.php

Posted: Wed Jul 12, 2017 3:47 am
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.

Re: accountcsv.php

Posted: Wed Jul 12, 2017 9:53 am
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.

Re: accountcsv.php

Posted: Wed Jul 12, 2017 10:22 am
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.

Re: accountcsv.php

Posted: Wed Jul 12, 2017 10:44 am
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.

Re: accountcsv.php

Posted: Wed Jul 12, 2017 2:35 pm
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.

Re: accountcsv.php

Posted: Wed Jul 12, 2017 3:40 pm
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.