Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] gho_xmlrpc
Notice: This thread is archived, this plugin is no longer available
**********************************************************
description
A plugin for retrieving data from external servers via XML-RPC-Request. It uses the IXR-Library provided by every TXP4.0 installation.
More Info: gho_xmlrpc 2006.1
<txp:gho_xmlrpc />
will make a test.getTime-Request to my server. This is for testing-purposes and returns a string containing the servertime at my serverlocation. Should be GMT+1.
<txp:gho_xmlrpc method="geo.getCountryFromIp"><txp:gho_vars server="REMOTE_ADDR" /></txp:gho_xmlrpc>
would put out the name (in english) of the country the IP of the visitor of the site is registered. (Please note, that this second example make use of my plugin gho_vars which needs to be installed on your TXP for working of the example!) This service also is provided by my own RPC-Server. Use with care, I do not guarantee for working of the scripts over there and its only for showing the use of the tag. Maybe later a real service will be implented over there – but thats another story.
For more Information about XML-RPC and what you can create with it is provided at xmlrpc.com.
how it works
You give the request-method and the server data in the attributes of the tag and the parameter separated by commata beetween the opening and closing tag. If you do not need to send parameter with the request (like in the first example) the tag closes itself.
attributes
You can make use of the following attributes, to get the corresponding data.
host path port- Host, path and port used by the XML-RPX-server of your choice. Default is set to connect to my own RPC-Server. So for production-purposes you will need to set this parameters.
- the method you want to request. At my XML-RPC-server you can try the methods geo.getCountrycodeFromIp and geo.getCountryFromIp (which will need an IP as parameter), geo.getCountrycodeFromName and geo.getCountrycodeFromName (which will need an hostname as parameter) and test.getTime (which needs no parameter).
todo
- For featurerequests contact me. Thanks.
history
2005-12-24 v.2006.1- re-release (revised for Textpattern 4.0.3)
- new documentation
- v.4.0.0 initial version working with TXP4.0
Last edited by graumeister (2006-02-02 05:25:28)
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Pages: 1
Topic closed