XML-RPC Working :)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

XML-RPC Working :)

cliveg
Hi everyone

Just to say thanks for all the help and guidance (especially from
BlueWall Slade) that has enabled me to get XML-RPC working
successfully with OpenSim 0.6.7

The solution is outlined below.

Best wishes

Clive


1) Enable the following parameters in OpenSim.ini

[NETWORK]
remoteDataPort = 20800
ExternalHostNameForLSL=standbyvle.bromley.ac.uk

[XMLRPC]
XmlRpcRouterModule = "XmlRpcRouterModule"
XmlRpcPort = 20800

2) Install PEAR on the Webserver running the PHP code and use PEAR to
install XML_RPC2

3) Use the following PHP script:

<?php

        require_once('XML/RPC2/Client.php');

        $conn=@mysql_connect("localhost", "yyyyyyyy", "xxxxxxxx")
                                        or die("Err:Conn");

        $rs=@mysql_select_db("sl", $conn)
                                        or die("Err:Db");

        $sql="select * from key_table where region = '$region'";

        $rs=mysql_query($sql,$conn);

        while( $row = mysql_fetch_array($rs) )
        {
                $channel=$row["lslkey"];
        }

         if ($action == 'delete')
        {
                $sql1="delete from key_table where lslkey = '$channel'";
                $rs1=mysql_query($sql1,$conn);
        }

        $intval="2010";

        // Create the client with the target uri
        $client =
XML_RPC2_Client::create('http://standbyvle.bromley.ac.uk:20800

                 ');

        // an array with the data for our call to the channel in the simulator
        $llPacket = array(
                'Channel' => $channel,
                'IntValue' => $intval,
                'StringValue' => $action);

        // call the rpc to get a response
        $xresponse = $client->llRemoteData($llPacket);

        // print the contents of the array in the browser window;
        print_r ($xresponse);
?>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users