Creating secure remote logins to cPanel
To provide hosts with a simple way to allow users to login remotely, cPanel created a module. This module queries the cPanel server for a URL that allows access to cPanel, WHM or Webmail (depending on the request). This URL is good for a single use and the session is destroyed as soon as the URL is accessed.
Integrating cPanel Logins with 3rd Party Softwares
You may be wishing to provide a unified experience for customers by having them sign into your customer area and then simply handing them off cPanel interface. To do so, you can pull their login information from your records and then use cPanel::LogMeIn::get_loggedin_url() to get a URL to hand off to their browser which will give them access to cPanel, WHM or Webmail.
#!/usr/bin/perl
use lib ‘/usr/local/cpanel’;
use Cpanel::LogMeIn ();my $user = USERNAME; #cPanel, WHM, or Webmail username being pulled from a database
my $pass = PASSWORD; #cPanel, WHM, or Webmail password being pulled from a database
my $host = DOMAIN; #Domain name associated with the cPanel, WHM or webmail account being pulled from a database
my $service = ‘cpanel’; #The service we want to login to (cpanel or whm or webmail)my($login_ok,$login_message,$login_url) = Cpanel::LogMeIn::get_loggedin_url(
‘user’=>$user,’pass’=>$pass,’hostname’=>$host,’service’=>$service,’goto_uri’=>’/’
);if ($login_ok) {
print “Location: $login_urlrnrn”;
} else {
print “Content-type: text/plainrnrn”;
print “LOGIN FAILED: $login_messagen”;
}exit (0);
After retrieving their username, password and domain name from database, cPanel hands them off to Cpanel::LogMeIn::get_loggedin_url() which returns the URL that is good for a single use. Then, it prints that URL as the location in their browser which will take them to the URL.
a WordPress rating system
Related posts:
if you are going to get a VPS server make sure that it has cPanel coz it makes server maintennance easier.,*.
a WordPress rating system