RPC services on this site

This site offers several XML-RPC services to PHP-GTK developers, in order to help them work out their dev skills with distributed programs.

Accessing the XML-RPC services

These services are available from this site using the following set of parameters:

server
http://www.php-gtk.eu
port
80
backend
/xmlrpc.php

Boring but mandatory warning

This being a service provided at no cost, it is not guaranteed to be available or reliable, or to return proper results, and can be revoked at any time without prior warning or compensation to users.

access_stats API

The site offers "access_stats", a simplistic API to obtain actual live statistics from the site over XML-RPC, to allow any developer to work with real data when creating charts with PHP-GTK.

access_stats API

  • method name: gtkphpnet.access_stats
  • parameters: none
  • returns: date-indexed array of number of nodes shown

Sample

This function is used on the site itself to produce the chart (using GD) shown in the site handbook about access stats.

geo_nick API

The site offers "geo-nick", a simplistic API to obtain this information coupled with the optional IRC nick field, to allow any developer to create mashups showing community PHP-GTK developers, as identified by nickname (no actual name information is made available through this API) on a map.

Geo-Nick API

  • method name: gtkphpnet.geo_nick
  • parameters:
    • $min_nick is the lower limit (not included) for nicks to be returned. Defaults to blank string ''
    • $count is the maximum number of entries to be returned.
  • returns: nick-indexed array of (latitude, longitude)

The site enforces a throttling restriction, limiting the maximum number of results any request can return. This means that in some cases clients will have to loop on the results to obtain the full list of geo-nick triplets. This is the purpose of the $min_nick parameter, which allows a client to loop over the full list of geo-nick triplets by looping over the results each time passing in the highest nickname from the previous pass, until the result set is empty.

An additional method may be useful: it returns the total number of active devs along with the number of those who have supplied valid geo-nick information.

  • method name: gtkphpnet.active_users
  • parameters: none
  • returns:
    array(
      'users'    => number of users, 
      'geo-nick' => number of users with geo-nick information
      )

Using the service

Contributors have written several pages showing the various ways in which PHP-GTK programs can make use of such XML-RPC services, complete with sample code using geo-nick.