-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathget_grid_info.php
More file actions
34 lines (30 loc) · 832 Bytes
/
get_grid_info.php
File metadata and controls
34 lines (30 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/******************************************************************************
* phpGridServer
*
* GNU LESSER GENERAL PUBLIC LICENSE
* Version 2.1, February 1999
*
*/
set_include_path(dirname($_SERVER["SCRIPT_FILENAME"]).PATH_SEPARATOR.get_include_path());
require_once("lib/services.php");
$serverParams = getService("ServerParam");
$params = $serverParams->getGridInfoParams();
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<gridinfo>";
echo "<platform>OpenSim</platform>";
$have_loginuri = False;
foreach($params as $name => $value)
{
if($name == "login")
{
$have_loginuri = True;
}
echo "<$name>".htmlentities($value)."</$name>";
}
if(!$have_loginuri)
{
echo "<login>http://${_SERVER['SERVER_NAME']}:${_SERVER['SERVER_PORT']}/</login>";
}
echo "</gridinfo>";