accountcsv.php

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

accountcsv.php

Postby Tuck Fheman » Tue Jul 11, 2017 4:10 am

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.
Tuck Fheman
 
Posts: 59
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Postby Kent Briggs » Tue Jul 11, 2017 9:35 am

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

Re: accountcsv.php

Postby Tuck Fheman » Tue Jul 11, 2017 5:53 pm

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. =/
Tuck Fheman
 
Posts: 59
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Postby Kent Briggs » Tue Jul 11, 2017 7:12 pm

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

Re: accountcsv.php

Postby Tuck Fheman » Wed Jul 12, 2017 3:47 am

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.
Tuck Fheman
 
Posts: 59
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Postby Kent Briggs » Wed Jul 12, 2017 9:53 am

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

Re: accountcsv.php

Postby Tuck Fheman » Wed Jul 12, 2017 10:22 am

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.
Tuck Fheman
 
Posts: 59
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Postby Kent Briggs » Wed Jul 12, 2017 10:44 am

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

Re: accountcsv.php

Postby Tuck Fheman » Wed Jul 12, 2017 2:35 pm

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.
Tuck Fheman
 
Posts: 59
Joined: Tue Jul 04, 2017 6:44 am

Re: accountcsv.php

Postby Kent Briggs » Wed Jul 12, 2017 3:40 pm

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

Next

Return to Site Administration

Who is online

Users browsing this forum: No registered users and 11 guests