mirror of
https://github.com/justinccdev/opensimulator-tools.git
synced 2026-08-14 09:12:07 +00:00
add get-region-by-uuid example program
This commit is contained in:
@@ -14,6 +14,17 @@ function GetRegionFlags($serviceUri, $regionId, $debug = FALSE)
|
||||
return PostToService($serviceUri, http_build_query($params), $debug);
|
||||
}
|
||||
|
||||
function GetRegionByUuid($serviceUri, $regionId, $debug = FALSE)
|
||||
{
|
||||
$params
|
||||
= array(
|
||||
'SCOPEID' => UUID_ZERO,
|
||||
'REGIONID' => $regionId,
|
||||
'METHOD' => "get_region_by_uuid");
|
||||
|
||||
return PostToService($serviceUri, http_build_query($params), $debug);
|
||||
}
|
||||
|
||||
function GetRegionRange($serviceUri, $minX, $minY, $maxX, $maxY, $debug = FALSE)
|
||||
{
|
||||
$params
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
require_once 'Console/CommandLine.php';
|
||||
require_once "../../config.php";
|
||||
require_once "../../utils.php";
|
||||
require_once "$IP/connectors/grid-service-connector.php";
|
||||
|
||||
$parser = new Console_CommandLine();
|
||||
|
||||
$parser->addArgument('regionID');
|
||||
|
||||
try
|
||||
{
|
||||
$params = $parser->parse();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$parser->displayError($e->getMessage());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
GetRegionByUuid($GRID_SERVICE_URI, $params->args['regionID'], TRUE);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user