Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Dec 2007
    Location
    Marília, SP, Brazil
    Posts
    18

    Default cpanel api

    Hi,

    I have "cPanel 11.18.6-STABLE" and have a link to verify the server status (http://www.xxx.com.br:2082/frontend/x3/status.html) i want to know if its possible to aply this service at cpanel api. I have 10 servers and i want to create one page with all 11 servers status. This status is important to me.

    Thanks

  2. #2
    Member
    Join Date
    Dec 2007
    Location
    Marília, SP, Brazil
    Posts
    18

    Default

    i got one script to do this:
    Code:
    $user = "";
    $pass = "";
    $servidor = "xx.xx.xx.xx";
    
    	$page = @file_get_contents("https://$user:$pass@$servidor:2087/scripts/servup");
    
    	$int = preg_match("/<center>\s+?<table>.*?<\/table><\/center>/is",$page, $match);
    	echo '<html>
    			<head>
    			<style>
    			.tbcell {
    			  font: normal 11px Arial, Helvetica, Tahoma, Verdana, sans-serif;
    			  text-decoration: none;
    			  color: #4B4B4B;
    			}
    			</style>
    			</head>
    			<body>
    
    			<table width="100%">
    				<tr>
    					<td align="center" class="tbcell">
    						<b>Status do Servidor:</b> '.$servidor.'<br><br>';
    
    	if($int) { 
    	  echo str_replace('src=/','src=',$match[0]);
    	}
    	else {
    	  echo 'Unable to access server status. Please try again later.';
    	}
    
    	echo '</td>
    			</tr>
    				</table>';

  3. #3

  4. #4
    Member
    Join Date
    Dec 2007
    Location
    Marília, SP, Brazil
    Posts
    18

    Default

    i know, i use cpanel api, but i'm searching server status scripts cpanel api.

    but now i have a code

    []´z

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 06-04-2011, 09:52 AM
  2. cpanel API
    By cpnaba in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-11-2007, 08:24 AM
  3. cpanel API
    By sangreal in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-25-2006, 01:13 AM
  4. CPanel API
    By davenarc in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-11-2004, 06:54 PM
  5. cpanel API
    By puneet in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-09-2004, 05:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube