diff options
Diffstat (limited to 'update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php')
| -rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 40 | 
1 files changed, 40 insertions, 0 deletions
| diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php new file mode 100644 index 0000000..856bb6a --- /dev/null +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | <?php | ||
| 2 | /** | ||
| 3 | * | ||
| 4 | * @package phpBB3 | ||
| 5 | * @version $Id: functions_instadisc.php 2008-08-06 07:12:00Z hatkirby $ | ||
| 6 | * @version (c) 2008 Starla Insigna | ||
| 7 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @ignore | ||
| 13 | */ | ||
| 14 | if (!defined('IN_PHPBB')) | ||
| 15 | { | ||
| 16 | exit; | ||
| 17 | } | ||
| 18 | |||
| 19 | include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc'); | ||
| 20 | |||
| 21 | /** | ||
| 22 | * Send an InstaDisc Item | ||
| 23 | */ | ||
| 24 | function sendItem($title, $author, $url, $semantics) | ||
| 25 | { | ||
| 26 | $verID = rand(1,65536); | ||
| 27 | |||
| 28 | $client = new xmlrpc_client($config['id_central_server']); | ||
| 29 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), | ||
| 30 | new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), | ||
| 31 | new xmlrpcval($verID, 'int'), | ||
| 32 | new xmlrpcval($config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/', 'string'), | ||
| 33 | new xmlrpcval($title, 'string'), | ||
| 34 | new xmlrpcval($author, 'string'), | ||
| 35 | new xmlrpcval($url, 'string'), | ||
| 36 | new xmlrpcval($semantics, 'array'))); | ||
| 37 | $client->send($msg); | ||
| 38 | } | ||
| 39 | |||
| 40 | ?> | ||
