API and HTML Examples

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

Re: API and HTML Examples

Postby treeman » Mon Aug 23, 2010 3:51 am

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
treeman
 
Posts: 8
Joined: Sat Apr 24, 2010 5:26 am

Re: API and HTML Examples

Postby Kent Briggs » Mon Aug 23, 2010 9:22 am

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

Re: API and HTML Examples

Postby treeman » Tue Aug 24, 2010 2:03 am

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:
treeman
 
Posts: 8
Joined: Sat Apr 24, 2010 5:26 am

Re: API and HTML Examples

Postby treeman » Tue Aug 24, 2010 3:28 am

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
treeman
 
Posts: 8
Joined: Sat Apr 24, 2010 5:26 am

Re: API and HTML Examples

Postby khaznadar » Mon Jul 04, 2011 2:49 pm

Hey Kent,

Do you have any API function to return Chips on Tables ? Any PHP Example for it?

Thank you
khaznadar
 
Posts: 9
Joined: Tue Jan 19, 2010 4:29 am

Re: API and HTML Examples

Postby Kent Briggs » Mon Jul 04, 2011 5:59 pm

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

Re: API and HTML Examples

Postby DrAmir » Fri Mar 09, 2012 12:23 pm

I'm searching for Ajax PHP Login in PM
Who can help me ?
DrAmir
 
Posts: 1
Joined: Fri Mar 09, 2012 9:01 am

Re: API and HTML Examples

Postby fafafa » Sat Mar 17, 2012 4:12 am

who know api code for PLAYER CHIP BALANCE like picture>>
Image
fafafa
 
Posts: 41
Joined: Thu Feb 23, 2012 10:01 am

Re: API and HTML Examples

Postby Danielle » Sun Nov 18, 2012 5:35 pm

fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
Image



i have that script ;)
Danielle
 
Posts: 107
Joined: Mon Sep 13, 2010 7:29 pm

Re: API and HTML Examples

Postby viktor » Sat Aug 03, 2013 9:49 am

Danielle wrote:
fafafa wrote:who know api code for PLAYER CHIP BALANCE like picture>>
Image



i have that script ;)


Share pls :).
viktor
 
Posts: 78
Joined: Sat Jul 20, 2013 11:30 am

PreviousNext

Return to Site Administration

Who is online

Users browsing this forum: No registered users and 7 guests

cron