curl
cURL support enabled
cURL Information 7.20.0
Age 3
Features
AsynchDNS Yes
Debug No
GSS-Negotiate No
IDN No
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO No
SSL Yes
SSPI Yes
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
Host i386-pc-win32
SSL Version OpenSSL/0.9.8m
ZLib Version 1.2.3
I take it this means yes
API and HTML Examples
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API and HTML Examples
What happens if you put your site online and run this php file:treeman wrote: cURL support enabled
Code: Select all
<?php
include "API.php"; // $pw and $url set in this file
$params = "Password=" . $pw . "&Command=SystemStats";
$api = Poker_API($url,$params,true);
echo "<h3>Poker Server Status</h3>\r\n";
if ($api["Result"] == "Error") die("Error: " . $api["Error"]);
echo "Logins: " . $api["Logins"] . "<br/>\r\n";
echo "Filled Seats: " . $api["FilledSeats"] . "<br/>\r\n";
echo "Occupied Tables: " . $api["OccupiedTables"] . "<br/>\r\n";
echo "Up Time: " . $api["UpTime"] . "<br/>\r\n";
?>
Re: API and HTML Examples
to me it is starting at the api in line 29.
which is $api[$namevalue[0]] = $namevalue[1]; in the api.php
cheers Paul
Notice: Undefined offset: 1 in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\API.php on line 29
Poker Server Status
Notice: Undefined index: Result in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 6
Notice: Undefined index: Logins in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 7
Logins:
Notice: Undefined index: FilledSeats in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 8
Filled Seats:
Notice: Undefined index: OccupiedTables in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 9
Occupied Tables:
Notice: Undefined index: UpTime in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 10
Up Time:
which is $api[$namevalue[0]] = $namevalue[1]; in the api.php
cheers Paul
Notice: Undefined offset: 1 in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\API.php on line 29
Poker Server Status
Notice: Undefined index: Result in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 6
Notice: Undefined index: Logins in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 7
Logins:
Notice: Undefined index: FilledSeats in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 8
Filled Seats:
Notice: Undefined index: OccupiedTables in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 9
Occupied Tables:
Notice: Undefined index: UpTime in C:\Program Files\EasyPHP-5.3.2i\www\kplpoker\pokerroom\apitest.php on line 10
Up Time:
Re: API and HTML Examples
I new it was me. sorry to have bothered you with this.
now a word to the setup because that's what tricked me and i have reread the who file on api.
the chapter below has the clue.
To use this system you must have "Enable API" set to "Yes" in the server settings and your server must be started and online. It works by making an HTTP request to the file port of your server with /api appended to the end of the URL. Parameters can be passed via GET (embedded in the URL) or via POST (embedded in the HTTP header). There are two parameters that must be included with each request: Password and Command. Password must be set to your API password and Command is set to one of the available commands as listed below. Other parameters may be required, depending on the particular command.
after I had it running I set the file and system up in a sub folder and thus appended the /api at the end of that folder in the api.php. I had it running and when i tidied everything into its own folder and corrected all to point at that and that was the mistake as the api looks at the server not the folder. it should be as written in your chapter.
sorry again i had a thought it was me in the first place.
Beers and Cheers Paul
now a word to the setup because that's what tricked me and i have reread the who file on api.
the chapter below has the clue.
To use this system you must have "Enable API" set to "Yes" in the server settings and your server must be started and online. It works by making an HTTP request to the file port of your server with /api appended to the end of the URL. Parameters can be passed via GET (embedded in the URL) or via POST (embedded in the HTTP header). There are two parameters that must be included with each request: Password and Command. Password must be set to your API password and Command is set to one of the available commands as listed below. Other parameters may be required, depending on the particular command.
after I had it running I set the file and system up in a sub folder and thus appended the /api at the end of that folder in the api.php. I had it running and when i tidied everything into its own folder and corrected all to point at that and that was the mistake as the api looks at the server not the folder. it should be as written in your chapter.
sorry again i had a thought it was me in the first place.
Beers and Cheers Paul
Re: API and HTML Examples
Hey Kent,
Do you have any API function to return Chips on Tables ? Any PHP Example for it?
Thank you
Do you have any API function to return Chips on Tables ? Any PHP Example for it?
Thank you
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API and HTML Examples
I don't have an example written but the API function you want is RingGamesPlaying, which will return a list of the players at the specified table and their chip counts. And there's a corresponding API function for tournaments called TournamentsPlaying.khaznadar wrote:Hey Kent,
Do you have any API function to return Chips on Tables ? Any PHP Example for it?
Thank you
Re: API and HTML Examples
I'm searching for Ajax PHP Login in PM
Who can help me ?
Who can help me ?
Re: API and HTML Examples
who know api code for PLAYER CHIP BALANCE like picture>>
Re: API and HTML Examples
fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
i have that script
Re: API and HTML Examples
Share pls .Danielle wrote:fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
i have that script