Hello, we just bought PM Pro yesterday and have written Drupal modules to tie it into our existing site.
I'm using the example PHP files provided on this site and I am working with the SystemStats.php at the moment just to get the API working correctly.
Right now I get a perfect response if I cheat and type the URL and parameters into the address bar of a browser, but when using libcurl in code it fails with "Connection Refused" .. I have verfied libcurl seems to be working correctly otherwise and I'm at a loss as to where to look.
I have not modified any of the example code other than to input my own URL and API password.
Any suggestions would be awesome. Thank you!
API Connection Refused
-
- Site Admin
- Posts: 5878
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API Connection Refused
Is the PHP running on a different system than the poker server? If so, check with your PHP host provider and see if they have firewall settings blocking any destination ports (like 8087). A lot them will allow outgoing connections to port 80 and block everything else by default.DeuceRag wrote:Right now I get a perfect response if I cheat and type the URL and parameters into the address bar of a browser, but when using libcurl in code it fails with "Connection Refused" .. I have verfied libcurl seems to be working correctly otherwise and I'm at a loss as to where to look.
Re: API Connection Refused
Sorry, after hours of beating my head against the wall. I SSH'd into my shared hosting account and tried a wget with the URL I could get to work from the browser. This failed too. Got on live chat with HostGator and sure enough, they were blocking outbound ports, but corrected it for me.
Maybe this will save someone else some time.
Thanks!
Maybe this will save someone else some time.
Thanks!
Re: API Connection Refused
Yes, this is what happened. Thank you!Kent Briggs wrote:Is the PHP running on a different system than the poker server? If so, check with your PHP host provider and see if they have firewall settings blocking any destination ports (like 8087). A lot them will allow connections to port 80 and block everything else by default.DeuceRag wrote:Right now I get a perfect response if I cheat and type the URL and parameters into the address bar of a browser, but when using libcurl in code it fails with "Connection Refused" .. I have verfied libcurl seems to be working correctly otherwise and I'm at a loss as to where to look.