#!/usr/local/bin/php -d disable_functions=""
render('');
$domain = getParam('domain');
if (!$domain) {
echo '
No domain provided
';
die();
}
try {
$conf = new Configuration();
$api = new SpamExperts_API($conf->get('api_hostname'), $conf->get('api_username'), $conf->get('api_password'));
if ($conf->get('add_domain_during_login')) {
$api->protectDomains(array($domain), $conf, new DirectAdmin_API());
}
$res = $api->login($domain);
$msg = $res ? 'Logging for ' . $domain . ' successful. Please wait...' : 'Unable to get login token for ' . $domain;
} catch (Exception $e) {
echo '' . $e->getMessage() . '
';
die();
}
?>
Please Wait...