Welcome to mirror list, hosted at ThFree Co, Russian Federation.

simpleregister.php « scripts - github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 75f2e204cded02c386258203c6eea869f7d3e6d5 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
// Really simple script to add users to your mumble server.
// Make sure to select the server this script should be used for first:
$serverId = 1;

// Requires a correctly set up PHP-ICE Module and mumble server running with ICE.
//  For instructions see http://mumble.sourceforge.net/ICE

// Credits
//  This script was created by Kissaki

// This is as simple as it can get. You really SHOULD NOT make the URL to this script all-public as it may be abused/spammed.

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<?php

Ice_loadProfile();

if( isset($_GET['uname']) && $_GET['password'] && $_GET['email'] && $_GET['uname']!='' && $_GET['password']!='' )
{

  try {
    $base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502");
    $meta = $base->ice_checkedCast("::Murmur::Meta");

    $server = $meta->getServer($serverId);

		if(empty($server)){
			echo 'Server could not be found.';
		}else{
			$registrationId = $server->registerPlayer($_GET['uname']);

	    $registration = $server->getRegistration(intval($registrationId));
	    $registration->pw = $_GET['password'];
	    $registration->email = $_GET['email'];
	    $server->updateregistration($registration);
		}

	}catch(InvalidPlayerException $ex){
		echo 'InvalidPlayerException';
	}catch(ServerBootedException $ex){
    echo 'Server is not running';
	}catch(Ice_UnknownLocalException $exc){
		echo 'Ice could probably not be found';
	}catch (Ice_Exception $ex){
    echo "<p>\n<pre>\n";
    print_r($ex);
    echo "</pre>\n</p>\n";
  }
}

?>
  <form action="" method="get">
    <table>
      <tr><td>Username</td><td><input name="uname" type="text" value=""/></td></tr>
      <tr><td>Password</td><td><input name="password" type="password" value=""/></td>
      <tr><td>eMail</td><td><input name="email" type="text" value=""/></td></tr>
    </table>
    <input type="submit"/>
  </form>
</body>
</html>