9xlinux

Well-Known Member
Verifed Vendor
Dec 20, 2009
185
0
66
cPanel Access Level
Root Administrator
Code:
#!/usr/bin/perl
#WHMADDON:HelloWorld:Hello World

use lib '/usr/local/cpanel';
use Cpanel::cPanelFunctions ();
use Cpanel::Form            ();
use Cpanel::Config          ();
use Whostmgr::HTMLInterface ();
use Whostmgr::ACLS          ();

print "Content-type: text/html\r\n\r\n";

Whostmgr::ACLS::init_acls();
if ( !Whostmgr::ACLS::hasroot() ) {
print "You need to be root...\n";
exit();
}
print "<meta http-equiv=\"refresh\" content=\"0;url=hello.php\">";
1;