1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

PHP KAG API Client Library [wip]

Discussion in 'Community Dev Corner' started by garanis, Jun 18, 2012.

Mods: Downburst, Mazey
  1. garanis

    garanis Shark Slayer

    Messages:
    22
    Updated: 6/24/2012

    I've got an initial stab at building a PHP KAG API Client library up.

    https://github.com/wschalle/KAGClient.git

    Pull requests welcome.

    Features:
    • Servers list API support
    • Server status API support
      • supports ipv6
    • Server minimap API support
    • User information API support
    • Rudimentary error handling
    Examples Included:
    • Server Browser Web App
    • Minimap fetch script
    Changelog:
    • 6/24/2012 - v0.2
      • Added ipv6 support for library and server browser example
      • Added server browser example
      • Added basic error handling
      • Added bootstrap script
      • Added minimap fetch script
    • 6/17/2012 - v0.1
      • Initial build
     
    Noburu likes this.
  2. FliesLikeABrick

    FliesLikeABrick THD Team THD Team Administrator Global Moderator

    Messages:
    952
    Does it work properly if IPv6 addresses are given instead of IPv4? e.g. if I did 2001:470:4:727::6 instead of 199.168.184.8 to identify the server?

    (because as you can see at the URL below, it has an IPv6 address)
    https://api.kag2d.com/server/ip/199.168.184.8/port/23002/status

    I'll try and get the class used in the actual client/server posted today so that you can double-check your functionality against how we do it
     
  3. garanis

    garanis Shark Slayer

    Messages:
    22
    No -- I haven't got an IPv6 test server, and my home certainly doesnt have a v6 address either. I'll add that as a param.
     
  4. FliesLikeABrick

    FliesLikeABrick THD Team THD Team Administrator Global Moderator

    Messages:
    952
    Or just accept an IPv4 or IPv6 address and your code figures out which it is
     
  5. garanis

    garanis Shark Slayer

    Messages:
    22
    Good plan- I'll do that.
     
Mods: Downburst, Mazey