RemoteAdmin:admin save xml
From OpenSimulator
(Difference between revisions)
												
			 (→Optional Parameters)  | 
			 (→PHP)  | 
			||
| Line 75: | Line 75: | ||
== Example ==  | == Example ==  | ||
=== PHP ===  | === PHP ===  | ||
| + | This example needs the RemoteAdmin PHP Class file available [http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass here].  | ||
| + | |||
<source lang="php">  | <source lang="php">  | ||
<?php  | <?php  | ||
Revision as of 16:03, 7 November 2013
admin_save_xml remotely allows to execute the Save XML command
Contents | 
Enabling admin_save_xml
If not all functions are enabled, use admin_create_region to enable the function in the [RemoteAdmin] section
enabled_methods = admin_save_xml,...
Parameters
Required Parameters
These parameters are required
| parameter | Description | Values | 
|---|---|---|
| region_name | Name of the new region, optionaly region_uuid | |
| filename | file name | 
Optional Parameters
These parameters are optional and do not need to be set
| parameter | Description | Values | 
|---|---|---|
| region_id | region uuid, optional region_name | |
| xml_version | xml_version, default 1 | 1, 2 | 
Returned Parameters
Returned Parameters
These parameters are returned by Remote Admin
| parameter | Description | Values | 
|---|---|---|
| switched | true when region was found | true, false | 
| saved | true when successfully saved xml | 
Error messages
No error messages
Notes
Example
PHP
This example needs the RemoteAdmin PHP Class file available here.
<?php // Including the RemoteAdmin PHP class. include('RemoteAdmin.php'); // Instantiate the class with parameters identical to the Python example above $myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret'); // Invoke admin_save_xml (multiple parameters) $parameters = array('region_name' => 'My Plaza', 'filename' => 'my_backup.xml'); $myRemoteAdmin->SendCommand('admin_save_xml', $parameters); ?>