Hey,

There are multiple examples here: http://opensimulator.org/wiki/RemoteAdmin
Also you can find the available commands with its parameters at that page.
There is also a remote admin class from the abondened wixtd project which is 
nice and short:

<?php
/*
 * Copyright (c) 2008, 2009 WiXTD Contributors, 
http://forge.opensimulator.org/gf/project/wixtd/
 * See install/LICENSE for the full licensing terms of this file.
*/

class remote {

        function __construct($simUri,$rpcPort) {
        $this->simUri = $simUri;
        $this->rpcPort = $rpcPort;
        }
        
        function call($command,$parameters = NULL) {
        $request = xmlrpc_encode_request($command, $parameters);
        $ch = curl_init();
        $str  = array(
        "Content-Type: text/xml",
        "Request URI: /RPC2"
        );
        curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);  
        curl_setopt($ch, CURLOPT_HTTPHEADER, $str);     
        curl_setopt($ch, CURLOPT_URL, $this->simUri."/RPC2");
        curl_setopt($ch, CURLOPT_PORT, $this->rpcPort); 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
        curl_setopt($ch, CURLOPT_TIMEOUT, 1);   
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
        $result = curl_exec($ch);
        curl_close($ch); 
        if($result) return xmlrpc_decode($result);
        else return false;
        }
}
?>
?>

initiate with something like(may be a little wrong, my php is kinda rusty): 
ra = new remote('http://localhost',9000);
$params = array("param1" => "value1","param2" => "value2");
result = ra.call('my_rm_command',$params);

Good luck!

Jeroen

On Thursday 13 May 2010 20:43:58 andrew johnson wrote:
> i looked at how setting up the remoteadmin for my opensim
> for example my friend starts up my Opensim on remote computer
> so i am confused because the page on opensim didn't provide the clear step
> to step how set up it - i wanted use PHP thanks
> 
> _________________________________________________________________
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
> We want to hear all your funny, exciting and crazy Hotmail stories. Tell us
> now _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to