End of Life and GDPR

If you're reading the community site these days, you certainly noticed that not a single piece of significant content was created since 2015, and not much since 2013.

Whatever this may mean for PHP-GTK itself is another issue, but for the site itself, it means it ceased to be relevant about 5 years ago, and it's time to move on for the site members. Since the site contains non-anonymous user, it will fall under the new EU GDPR regulations entering into force on 2018-05-25, and there is no point for me to spend time on evolving the site towards compliance when no one is actually using it.

So here is the EOL announcement: the site will be shutting down on 2018-05-24 and its data will taken offline.

A static version of the articles may be published again at some point here or elsewhere, but I wouldn't hold my breath on it. So if you have even some interest in the site content, be sure to copy/paste the pages of interest before it goes dark on 2018-05-24. Or contact me if you want a copy of the files and content, or check my blog for newer content.

Thanks all for participating, it's been a pleasure while it lasted.


Accessing geo-nick with Zend Framework (Zend_XmlRpc_Client)

Closing the tour of XML-RPC implementations usable with PHP-GTK, the shortest code to access our geo_nick service makes use a higher-level XML-RPC library: the Zend_XmlRpc_Client from the Zend Framework.

Unlike earlier implementations, Zend Framework (ZF) includes both the mashalling/unmarshalling to/from XML line format and the HTTP request/reponse process, wrapped up in a class-based mechanism using exceptions to handle errors, both at the HTTP and XML service levels (not demonstrated here).

if (!class_exists('gtk'))
"Please load the php-gtk2 module in your php.ini\r\n");


* Prepare the request data
$host    = '';
$port    = 80;
$backend = 'xmlrpc.php';

$client = new Zend_XmlRpc_Client("http://$host:$port/$backend");

$res = $client->call('gtkphpnet.geo_nick', '', 10);

* and display them in a PHP-GTK2 window
$window = new GtkWindow();
$window->set_title(' geo-nick service');
$window->connect_simple('destroy', array('Gtk','main_quit'));
$textBuffer = new GtkTextBuffer();
$textBuffer->set_text(print_r($res, true));

$textView   = new GtkTextView();


Of interest to PHP-GTK apps using more than one XML-RPC series of service is the notion of a server proxy available in ZF. This allows one to rewrite:

// ...
$client = new Zend_XmlRpc_Client("http://$host:$port/$backend");
$res = $client->call('gtkphpnet.geo_nick', '', 10);

as :

= new Zend_XmlRpc_Client("http://$host:$port/$backend");
$server = $client->getProxy('gtkphpnet');
$res = $server->geo_nick('', 10);

...which make XML-RPC calls almost like local calls, a bit like using a full SOAP stack without all the associated overhead.