RemoteAdmin:RemoteAdmin Examples

Below are a view Examples on how to send commands from a remote enviroment.

Example 1 - "admin_create_user"
This example needs the Nwc.XmlRpc library, located in your OpenSimulator bin folder.

Python 3.6 Example - admin_create_user
Create file: OpenSimAdmin.ini

Example 1 - "create user"
(used with first C#.NET method above)

POST admin_create_user HTTP/1.0 Host: http://10.0.0.12:16384/ Content-type: text/xml Content-Length: 993

&lt;?xml version="1.0"?&gt; &lt;methodCall&gt; &lt;methodName&gt;admin_create_user&lt;/methodName&gt; &lt;params&gt; &lt;param&gt; &lt;value&gt; &lt;struct&gt; &lt;member&gt; &lt;name&gt;password&lt;/name&gt; &lt;value&gt;&lt;string&gt;password&lt;/string&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;user_firstname&lt;/name&gt; &lt;value&gt;&lt;string&gt;male&lt;/string&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;user_lastname&lt;/name&gt; &lt;value&gt;&lt;string&gt;9999&lt;/string&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;user_password&lt;/name&gt; &lt;value&gt;&lt;string&gt;password&lt;/string&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;user_email&lt;/name&gt; &lt;value&gt;&lt;string&gt;none@email.com&lt;/string&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;start_region_x&lt;/name&gt; &lt;value&gt;&lt;int&gt;128&lt;/int&gt;&lt;/value&gt; &lt;/member&gt; &lt;member&gt; &lt;name&gt;start_region_y&lt;/name&gt; &lt;value&gt;&lt;int&gt;128&lt;/int&gt;&lt;/value&gt; &lt;/member&gt; &lt;/struct&gt; &lt;/value&gt; &lt;/param&gt; &lt;/params&gt; &lt;/methodCall&gt;

RemoteAdmin executable for Windows
The RemoteAdmin executable for Windows is a command line tool based on the RemoteAdmin PHP Class.

Example 1
This example needs the RemoteAdmin PHP Class file available here (Original) or here (Revisited).

Note: This script does not appear to work for create user because it tries to pass the start region x and y as a string when the RemoteAdmin needs a string. The class needs to be edited to pass it as a number or edit the remoteadmin source to convert the string to a unsigned int.

Example 2
Another example in PHP5, using CURL.

Example 3
Another example provided by MarcelEdward (triplehx3) can be found here. (Tested with OpenSimulator v0.9.1.0 Dev).

Perl
Because the OpenSimulator internal web server just accepts HTTP/1.0 requests, it's worth to give a perl example. It's not a daily thing to do HTTP/1.0 within the LWP environment. You can get the Perl example here.

Credits
Thanks to DrScofield for the Python Script Sources : http://xyzzyxyzzy.net/2008/01/23/using-pythons-xmlrpclib-with-opensim/