Location: PHPKode > projects > Simple Way to Usenet > config/hellarpc.opt.php
<?php

/**
 * This script defines the options set needed to handle the connection
 * to an hellanzb daemon.
 * First you must select how we remember configuration  of the availables hellanzb rpc.
 * mode
 * conf : Staticly in conf
 * db	: from a dbobject, also require the CNF option defined
 *
 * Than a way to store the rpcs status.
 * cachetype
 * db	: using a database, cacheconf is the CNF to use
 * file : using fs, cacheconf is the path cache folder.
 * 
 * For each hellaNZB rpc you must define :
 * rpc 		: the name assigned to that hellanzb rpc
 * host		: the host to connect to
 * port 	: the port to connect to 
 * user 	: the user used for auth
 * pass 	: the password used for auth
 * conTO	: The connection timeout in secondes (used in daemon mode to keep handler alive, reduce this will not solve lock problem when rpc's host does not reply)
 * staTO	: The local version of the status expire after ... secondes.
 * cachepol	: Status Cache policy
 * 				-1	: from cache if not expired
 * 				1	: always from cache, no netcall to update status
 * 				0	: never from cache (may lock page generation if host is not available.
 * repo 	: The file_repo used to access hellanzb destination folder.
 * repobaseurl: base url used to provide a direct link to repo content on the website to the client
 *  
 * @see swun/rpc/hellarpcs.class.php
 * @author  Benjamin Gillissen <hide@address.com>
 * 
 *	**************************************************************

	Copyright (C) 2007  Benjamin Gillissen
	
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details at:
	http://www.gnu.org/copyleft/gpl.html

 *	**************************************************************
 */

/* RPC cache using filesystem. 
$o['cachetype'] = 'file';
$o['cacheconf'] = PATH_CACHE.'/hellarpc';
*/
///* using database.
$o['cachetype'] = 'db';
$o['cacheconf'] = 'cache_rpc';
//*/


/* //RPC conf in db
$o['mode'] = 'db';
$o['CNF'] = 'hellarpcs';
*/
//RPC conf in config file
$o['mode'] = 'conf';
$i=0;
$o['rpcs'][$i]['rpc'] = 'Local-Hella';
$o['rpcs'][$i]['actif'] = TRUE;
$o['rpcs'][$i]['host'] = '127.0.0.1';
$o['rpcs'][$i]['port'] = '8760';
$o['rpcs'][$i]['user'] = 'hellanzb';
$o['rpcs'][$i]['pass'] = 'PASSWORD';
$o['rpcs'][$i]['conTO'] = 30;			
$o['rpcs'][$i]['staTO'] = 3;			
$o['rpcs'][$i]['cachepol'] = -1; 
$o['rpcs'][$i]['repo'] = 'Local-hella'; //see @ file_repo.opt.php
$o['rpcs'][$i]['repobaseurl'] = 'ftp://hide@address.com:21/news';	//to allow directlink from browser page
/*
$i++;
$o['rpcs'][$i]['rpc'] = 'Remote';
$o['rpcs'][$i]['actif'] = TRUE;
$o['rpcs'][$i]['host'] = '127.0.0.1';
$o['rpcs'][$i]['port'] = '8760';
$o['rpcs'][$i]['user'] = 'hellanzb';
$o['rpcs'][$i]['pass'] = 'PASSWORD';
$o['rpcs'][$i]['conTO'] = 30;			
$o['rpcs'][$i]['staTO'] = 10;			
$o['rpcs'][$i]['cachepol'] = -1;
$o['rpcs'][$i]['repo'] = 'Remote-hella';
$o['rpcs'][$i]['repobaseurl'] = 'ftp://anonymous:hide@address.com:21/';
*/
unset($i);

return $o;
Return current item: Simple Way to Usenet