Page 6 of 7

Re: API and HTML Examples

Posted: Mon Aug 23, 2010 3:51 am
by treeman
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

Re: API and HTML Examples

Posted: Mon Aug 23, 2010 9:22 am
by Kent Briggs
treeman wrote: cURL support enabled
What happens if you put your site online and run this php file:

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

Posted: Tue Aug 24, 2010 2:03 am
by treeman
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:

Re: API and HTML Examples

Posted: Tue Aug 24, 2010 3:28 am
by treeman
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

Re: API and HTML Examples

Posted: Mon Jul 04, 2011 2:49 pm
by khaznadar
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

Posted: Mon Jul 04, 2011 5:59 pm
by Kent Briggs
khaznadar wrote:Hey Kent,
Do you have any API function to return Chips on Tables ? Any PHP Example for it?
Thank you
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.

Re: API and HTML Examples

Posted: Fri Mar 09, 2012 12:23 pm
by DrAmir
I'm searching for Ajax PHP Login in PM
Who can help me ?

Re: API and HTML Examples

Posted: Sat Mar 17, 2012 4:12 am
by fafafa
who know api code for PLAYER CHIP BALANCE like picture>>
Image

Re: API and HTML Examples

Posted: Sun Nov 18, 2012 5:35 pm
by Danielle
fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
Image

i have that script ;)

Re: API and HTML Examples

Posted: Sat Aug 03, 2013 9:49 am
by viktor
Danielle wrote:
fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
Image

i have that script ;)
Share pls :).