Just Web Hosting Tips


Simple Cpanel And Webmail Login Script

Posted on March 07, 2010 by admin

The majority of hosting providers, resellers, and developers use cPanel to manage their hosting. Logging into cPanel or webmail is not the most “graceful” of transitions in my opinion and usually with direct input (ie: www.domain.com/cpanel or www.domain.com/webmail) defaulting to standard browser authentication is just archaic. We created a simple PHP script to shield the standard login for cPanel and webmail access for users; there may be a few variations of this script floating around on the net, though I felt our version useful enough to share for download. The end result is a usable cPanel login form allowing your customers to easily login by selecting either cPanel or Webmail, entering their user information and pressing submit.

The functionality is simple, the goal is to provide access to 2 pre-configured ports and your domain or IP via PHP.

Below is a quick sample of how this looks in your PHP file:

$domain = “domain.com”;
$port == “2083″ || $port == “2096″ ;

Now to go the extra mile we can give an SSL option with the ports which would be:

$port == “2083″ || $port == “2096″ ? $pre = “https://” : $pre = “http://”;

Configuration is extremely simple download the file package, jump into “cplogin.php” located inside the “process” directory and enter your domain name where commented. The form inside the package is functional and provides optional SSL support when accessing cPanel or Webmail.

You may want to adjust the CSS to fit the style of your website. If so, simply customized the attached stylesheet, upload and the install is complete.


Founder and Lead DeveloperVessio – Interactive Web Solutions
Article Source

Comments are closed.




↑ Top