Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cPanel Inactive Accounts Remover -- THT Support Included!
#1
cPanel Inactive Account Removers

I thought I might distribute this cPanel Inactive Account Remover which I developed in order to obtain more room for active free web hosting users. Since I am unable to find a suitable section more than here, I am posting the thread here. Mods are free to move it if it is essential.

More information can be found in here: http://perfectz.info/blog/inactive-accou...l-servers/

Installation

Make a backup of every account in the server in case it deletes active accounts by mistake.
Download the script.
http://perfectz.info/inactive-accounts-remover.tar.gz

Modify the config.php according to your settings. The config.php have the following variables which need to be changed.

PHP Code:
$ipaddress "192.168.0.1"//Servers IP Address
    
$host "hostname.example.com"//Hostname
    
$whmuser "root"//Username which has permissions to grab and delete user accounts
    
$whmkey ""//WHM Remote Access Key
    
$db_host "";
    
$db_name "";
    
$db_user "";
    
$db_passwd "";
    
$date 1330560000//Date in Unix format 

This $date variable is used to identify the new accounts in the server.
Some people just don't upload data or forward their domain right after they register with you. In that case it is a good practice to keep this to a date before 2 weeks or back. That's up to you. Remember to convert date to unix date format before you use it. Use http://www.onlineconversion.com/unix_time.htm
Eg: If you want to delete the inactive accounts created before 1st of May,2012, you will have the unix date as 1335830400.

Log into your server and upload all the files including config.php which you just modified.
*Remember not to upload the scripts to publicly accessible place. Upload it to somewhere else.
Eg:/usr/local/src/

Make the scripts executable.
Code:
chmod +x delete.php listaccts.php whm.php

Run whm.php and set output into a file.
Code:
php whm.php >> Output.html

The script itself has the functionality to fetch user account data from a cPanel server and delete inactive accounts automatically. This script uses JSON to fetch data and a point system to detect which accounts are to be deleted.


You can contribute in various ways. I will have my pleasure even though you don't. Smile

Comments and feedback is highly appreciated.
Reply
#2
(04-24-2012, 09:09 PM)eSupun Wrote: cPanel Inactive Account Removers

I thought I might distribute this cPanel Inactive Account Remover which I developed in order to obtain more room for active free web hosting users. Since I am unable to find a suitable section more than here, I am posting the thread here. Mods are free to move it if it is essential.

More information can be found in here: http://perfectz.info/blog/inactive-accou...l-servers/

Installation

Make a backup of every account in the server in case it deletes active accounts by mistake.
Download the script.
http://perfectz.info/inactive-accounts-remover.tar.gz

Modify the config.php according to your settings. The config.php have the following variables which need to be changed.

PHP Code:
$ipaddress "192.168.0.1"//Servers IP Address
    
$host "hostname.example.com"//Hostname
    
$whmuser "root"//Username which has permissions to grab and delete user accounts
    
$whmkey ""//WHM Remote Access Key
    
$db_host "";
    
$db_name "";
    
$db_user "";
    
$db_passwd "";
    
$date 1330560000//Date in Unix format 

This $date variable is used to identify the new accounts in the server.
Some people just don't upload data or forward their domain right after they register with you. In that case it is a good practice to keep this to a date before 2 weeks or back. That's up to you. Remember to convert date to unix date format before you use it. Use http://www.onlineconversion.com/unix_time.htm
Eg: If you want to delete the inactive accounts created before 1st of May,2012, you will have the unix date as 1335830400.

Log into your server and upload all the files including config.php which you just modified.
*Remember not to upload the scripts to publicly accessible place. Upload it to somewhere else.
Eg:/usr/local/src/

Make the scripts executable.
Code:
chmod +x delete.php listaccts.php whm.php

Run whm.php and set output into a file.
Code:
php whm.php >> Output.html

The script itself has the functionality to fetch user account data from a cPanel server and delete inactive accounts automatically. This script uses JSON to fetch data and a point system to detect which accounts are to be deleted.


You can contribute in various ways. I will have my pleasure even though you don't. Smile

Comments and feedback is highly appreciated.

hello, the download link to the inactivity scanner is missing. does it work ? Can i have the script please ?
Reply
#3
I'd be interested in seeing what conditions accounts have to meet to be considered inactive. Unfortunately the OP hasn't visited the forums since he posted this.
Kevin Mark - TheHostingTool Lead Developer
Reply
#4
http://web.archive.org/web/2012070114073...l-servers/

Unfortunately Archive.org doesn't have a copy of the actual script. Here's another script that this was based on. This script deleted an account if it scored at least 5 points based on the following criteria:
Quote:If the hosting account has no disk space used: 3 points
Domain shows an index: 2 points
Default web site page: 5 points
IP does not resolve: 5 points
Kevin Mark - TheHostingTool Lead Developer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)