Example #1
0
// Empty user or password supplied
define('WS_ERR_LOGIN_EMPTY_USERPASSWORD_ID', 1000);
define('WS_ERR_LOGIN_EMPTY_USERPASSWORD_STR', 'WS_ERR_LOGIN_EMPTY_USERPASSWORD');
// Too much logins in last hour
define('WS_ERR_LOGIN_TOOMUCHLOGINS_ID', 1001);
define('WS_ERR_LOGIN_TOOMUCHLOGINS_STR', 'WS_ERR_LOGIN_TOOMUCHLOGINS');
// The user has been deactivated
define('WS_ERR_LOGIN_USERNOTACTIVE_ID', 1002);
define('WS_ERR_LOGIN_USERNOTACTIVE_STR', 'WS_ERR_LOGIN_USERNOTACTIVE');
// Username or password does not match
define('WS_ERR_LOGIN_BADUSERPW_ID', 1003);
define('WS_ERR_LOGIN_BADUSERPW_STR', 'WS_ERR_LOGIN_BADUSERPW');
//  $opt['rootpath'] = '';
//  require_once($opt['rootpath'] . 'lib2/nusoap.inc.php');
require '../../lib2/nusoap.inc.php';
initSoapRequest('OCAPI10_Session', 'http://www.opencaching.pl/xml/ocapi10');
$nuserver->register('Login', array('user' => 'xsd:string', 'pwmd5' => 'xsd:string'), array('return' => 'xsd:string'));
$nuserver->register('IsValidSession', array('sessionid' => 'xsd:string'), array('return' => 'xsd:boolean'));
$nuserver->register('Logout', array('sessionid' => 'xsd:string'));
finishSoapRequest();
/**
 * Method Login
 *
 * @param string $user username or email
 * @param string $pwMd5 MD5 of the password
 * @return string Id of the session
 */
function Login($user, $pwMd5)
{
    global $login;
    if ($err = initSoapFunction()) {
Example #2
0
 ******************************************************************************************/
// Empty user or password supplied
define('WS_ERR_LOGIN_EMPTY_USERPASSWORD_ID', 1000);
define('WS_ERR_LOGIN_EMPTY_USERPASSWORD_STR', 'WS_ERR_LOGIN_EMPTY_USERPASSWORD');
// Too much logins in last hour
define('WS_ERR_LOGIN_TOOMUCHLOGINS_ID', 1001);
define('WS_ERR_LOGIN_TOOMUCHLOGINS_STR', 'WS_ERR_LOGIN_TOOMUCHLOGINS');
// The user has been deactivated
define('WS_ERR_LOGIN_USERNOTACTIVE_ID', 1002);
define('WS_ERR_LOGIN_USERNOTACTIVE_STR', 'WS_ERR_LOGIN_USERNOTACTIVE');
// Username or password does not match
define('WS_ERR_LOGIN_BADUSERPW_ID', 1003);
define('WS_ERR_LOGIN_BADUSERPW_STR', 'WS_ERR_LOGIN_BADUSERPW');
$opt['rootpath'] = '../../';
require_once $opt['rootpath'] . 'lib2/nusoap.inc.php';
initSoapRequest('OCAPI10_Session', $opt['page']['absolute_url'] . 'xml/ocapi10');
$nuserver->register('Login', array('user' => 'xsd:string', 'pwmd5' => 'xsd:string'), array('return' => 'xsd:string'));
$nuserver->register('IsValidSession', array('sessionid' => 'xsd:string'), array('return' => 'xsd:boolean'));
$nuserver->register('Logout', array('sessionid' => 'xsd:string'));
finishSoapRequest();
/**
 * Method Login
 *
 * @param string $user username or email
 * @param string $pwMd5 MD5 of the password
 * @return string Id of the session
 */
function Login($user, $pwMd5)
{
    global $login;
    if ($err = initSoapFunction()) {