Hello,
Is there a way to make a php script that list all the clients on my server.
And maybe more information like how big there hosting is and so on.
Thank you
Hello,
Is there a way to make a php script that list all the clients on my server.
And maybe more information like how big there hosting is and so on.
Thank you
Not exactly a direct answer to your question but much of that information is available thru WHM in the List Accounts function - at least quota and space used.
Yes but now to get a php script that does the same thing as list accounts,, thats what i am looking for.
Yeah this could actually be quite handy for a quick reference script
Tony Kammerer - Senior Admin, United Communications Ltd.
Proudly hosting over 50,000 customer websites since 1998!
Our lively customer community with over 70,000 posts!
What i want is to have a list of all my clients ( whm list accounts ) so that every one can see who i am hosting.
I think it should be a really handle script for alot of people.
Could some one please help me out on this.
Thank you.
In "List Accounts" there's a "CSV" option - get the link in the format you want and then use the API interface to fetch a new list and import it into your own database as frequently as you want. I don't think there is a "pre-written" script you can use at this point, so it's a case of write one yourself...
remember people CPanel is written in PERL NOT php
This is a pretty good start. The documentation can be found at http://cpanel.net/remoteaccess-php.html.
PHP Code:#!/usr/local/cpanel/3rdparty/bin/php
<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$user = "";
$accesshash = '';
$accts = listaccts($host,$user,$accesshash,0);
print_r($accts);
$pkgs = listpkgs($host,$user,$accesshash,0);
print_r($pkgs);
?>
Originally Posted by serv_co_za
Unless you know everyone personally, be carefull wanting to advertise that information as you could end up in hot water. Some may not take kindly to you annoucing that they are hosted with you.
Regards,
David
Forum Moderator