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.
accountcsv.php
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: accountcsv.php
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.
http://www.briggsoft.com/docs/pmavens/API_Examples.htm
You put them on a web server that has PHP installed and running.
-
- Posts: 213
- Joined: Tue Jul 04, 2017 6:44 am
Re: accountcsv.php
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. =/
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: accountcsv.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 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.
-
- Posts: 213
- Joined: Tue Jul 04, 2017 6:44 am
Re: accountcsv.php
I am 99% sure that is the case, but I will try again tonight.Kent Briggs wrote: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 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.
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: accountcsv.php
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 wrote:I am 99% sure that is the case, but I will try again tonight.
-
- Posts: 213
- Joined: Tue Jul 04, 2017 6:44 am
Re: accountcsv.php
Same server.Kent Briggs wrote: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 wrote:I am 99% sure that is the case, but I will try again tonight.
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: accountcsv.php
Then you should be able to connect to localhost without issue.Tuck Fheman wrote:Same server.
$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.
-
- Posts: 213
- Joined: Tue Jul 04, 2017 6:44 am
Re: accountcsv.php
Kent Briggs wrote:Then you should be able to connect to localhost without issue.Tuck Fheman wrote:Same server.
$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.
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: accountcsv.php
The API path is just an internal setting you can adjust here: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.
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.