How to detect server Control Panel type like cpanel and directadmin for using them api’s:
that’s enough for me if it just detects cpanel, directadmin, kloxo and plesk
$panel = ???????????;
switch($panel){
case 'cpanel':
$xmlapi = new xmlapi($ip);
//...
break;
case 'directadmin':
$sock = new HTTPSocket;
//...
break;
.
.
.
}
2
Answers
As hanky-panky said there is no straight forward solution for this, you need to implement your own creative method. you may need to detect one control panel with opening socket,while other using an specific file existence (ex. Cpanel puts api files on php include path) or any other idea.
you can use this class for this purpose
how to detect web hosting control panel type with php
code :
code2 :
how to detect web hosting control panel type with php preview