Description
Use the Rebranding API to Rebranding your Server.
Parameters
Sample Code
curl --insecure -d "editsettings='1'" -d "sn=Site Name" -d "logo_url=www.logo.com" -d "dark_logo_url=www.logo.com" -d "favicon_logo=www.favicon_logo.com" -d "footer_link=You can change the footer copyright here" -d "webmail_name=webuzo" -d "webmail_support_link=webmail support" -u "username:password" -X POST "https://hostname:2005/index.php?api=json&act=rebranding_settings"
<?php
$user = 'username';
$pass = 'password';
$url = 'https://'.rawurlencode($user).':'.rawurlencode($pass).'@domain.com:2005/index.php?api=json&act=rebranding_settings';
$post = array('editsettings' => '1',
'sn' => 'Site Name',
'logo_url' => 'www.logo.com',
'dark_logo_url' => 'www.logo.com',
'webmail_logo_url' => 'www.webmail_logo.com',
'favicon_logo' => 'www.favicon_logo.com',
'footer_link' => 'You can change the footer copyright here',
'webmail_name' => 'if empty then webmail name will be the webuzo',
'webmail_support_link' => 'Webmail support'
);
// Set the curl parameters
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(!empty($post)){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}
// Get response from the server.
$resp = curl_exec($ch);
// The response will hold a string as per the API response method.
$res = json_decode($resp, true);
// Done ?
if(!empty($res['done'])){
echo "<pre>";
print_r($res['done']);
echo "</pre>";
}else{
print_r($res['error']);
}
Output
The settings were saved successfully.