Posted on November 26th, 2008
4256 views
This tutorial will show you how to create a script that will help display the accounts that are currently on your Web Host Manager.
#!/usr/local/cpanel/3rdparty/bin/php The first line checks if you are connecting to the whm on the same server as the script then the username/accesshash and usessl are there to actually connect to the WHM. The Accesshash can be found by logging into your WHM and clicking Remote Access Hash. The next line retrieves the accounting file which is already installed by cPanel. $accts is a variable for the function listaccts which go listaccts(hostname, whmusername, whmaccesshash, usingssl); next it will split the array up from the function and will do so for all accounts. And finally it will echo the details. Domain Username: $key Domain: $value[0] Package: $value[1] Owner Of Account: $value[2] Thanks for reading and if your interested i am posting another tutorial on how to list packages as well this is all on pixel2life.com and check out my site www.pk-scripts.co.uk |