File: api.php

package info (click to toggle)
atheme-services 7.2.12-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,256 kB
  • sloc: ansic: 95,899; sh: 8,462; php: 5,032; perl: 3,327; makefile: 1,279; sed: 16; ruby: 15; python: 3
file content (28 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (8)
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
<?php

// Usage: 	Post values of api.php?username=&password=&service=&command=&params=
// Var:		username	Description: Your NickServ username
// Var:		password	Description: Your NickServ password
// Var:		service		Description: The name of the service you wish to communicate with on IRC (ChanServ, NickServ, etc)
// Var:		command		Description: The command to use, such as "identify", or "topic"
// Var:		params		Description: Parameters, just like the way you'd pass them in IRC.

// Example usage: api.php?username=Tony&password=Blair&service=ChanServ&command=topicappend&params=#somechannel some topic information

// By Ricky Burgin (Pseudonym: Orbixx) of Exoware

require_once('./atheme.php');

$params = explode(" ", urldecode($_POST['params']));

// echo print_r(explode(" ", urldecode($_POST['params'])));
if (isset($_POST['params']))
{
	echo atheme("127.0.0.1", 8080, "/xmlrpc", $_SERVER['REMOTE_ADDR'], $_POST['username'], $_POST['password'], $_POST['service'], $_POST['command'], $params);
}
else
{
	echo atheme("127.0.0.1", 8080, "/xmlrpc", $_SERVER['REMOTE_ADDR'], $_POST['username'], $_POST['password'], $_POST['service'], $_POST['command'], NULL);
}

?>