Fórum cPanel: Status do Servidor - Fórum cPanel

Ir para


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Status do Servidor status do servidor sem logar no cpanel.

#1 Membro offline   Luiz 

  • Membro Ativo
  • PipPipPip
  • Grupo: Membros
  • Posts: 57
  • Cadastrado: 22-agosto 06
  • Gender:Male
  • Location:São Paulo - SP

  Posted 06 fevereiro 2008 - 02:01

Estou tentando fazer esse script funcionar, para ver status do servidor sem logar no cpanel, mas não vai, mudei a porta para 2082 e tirei o https, será que mudou o caminho do cpanel? /scripts/servup

CODE

<?php
//<dv at josheli.com>
//
//Code for server status page outside of WHM.
//Copy green-status.gif, yellow-status.gif and red-status.gif from WHM to this script's directory.
//Change the user, pass and url. That's it.
//


$user = 'username';
$pass = 'password';
$url = 'www.mydomain.com';//do not include 'http://'

$page = @file_get_contents("https://$user:$pass@$url:2087/scripts/servup");

//$int = preg_match("/<table border=2>.*<\/table>/is",$page, $match);
$int = preg_match("/<center>\s+?<table>.*?<\/table><\/center>/is",$page, $match);
echo "<html><head></head><body>";
if($int) {
 echo str_replace('src=/','src=',$match[0]);
}
else {
 echo 'Unable to access server status. Please try again later.';
}
echo "</body></html>";
?>



Luiz
0

#2 Membro offline   Luiz 

  • Membro Ativo
  • PipPipPip
  • Grupo: Membros
  • Posts: 57
  • Cadastrado: 22-agosto 06
  • Gender:Male
  • Location:São Paulo - SP

  Posted 10 fevereiro 2008 - 02:07

Opa, eu mesmo respondo, rsrsrs biggrin.gif
Consegui, funciona bem.

[ ]


Luiz
0

#3 Membro offline   darkstarlinux 

  • Esse é irmão!!
  • PipPipPipPipPipPip
  • Grupo: Membros
  • Posts: 263
  • Cadastrado: 02-março 08
  • Gender:Male
  • Location:Curitiba - Pr

Posted 02 março 2008 - 02:00

Mais qual foi a solução?

Atenciosamente
Joabes

0

#4 Membro offline   Luiz 

  • Membro Ativo
  • PipPipPip
  • Grupo: Membros
  • Posts: 57
  • Cadastrado: 22-agosto 06
  • Gender:Male
  • Location:São Paulo - SP

Posted 15 abril 2008 - 02:17

QUOTE(darkstarlinux @ Mar 2 2008, 02:00 PM) <{POST_SNAPBACK}>
Mais qual foi a solução?

Atenciosamente
Joabes


Funcional e testada

CODE
<?php
//<dv at josheli.com>
//
//Code for server status page outside of WHM.
//Copy green-status.gif, yellow-status.gif and red-status.gif from WHM to this script's directory.
//Change the user, pass and url. That's it.
//preciso copiar as cores do status (verde, amarelo e vermelho)  para dentro do dir public_html


$user = 'username'; // usuario revenda com acesso status do servidor, setado no whm.
$pass = 'password'; // senha de revenda.
$url = 'www.mydomain.com';//do not include 'http://'

$page = @file_get_contents("http://$user:$pass@$url:2082/scripts/servup");

//$int = preg_match("/<table border=2>.*<\/table>/is",$page, $match);
$int = preg_match("/<center>\s+?<table>.*?<\/table><\/center>/is",$page, $match);
echo "<html><head></head><body>";
if($int) {
echo str_replace('src=/','src=',$match[0]);
}
else {
echo 'Unable to access server status. Please try again later.';
}
echo "</body></html>";
?>



se alguém tiver alguma duvida entre em contato via mp, fiz uns ajustes cpm refresh a cadas 5 minutos e mostra a contagem para a proxima atualização, nada demais, mas ajuda para ver o status do servidor rapidamente.

[]

Luiz
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 membro(s), 1 visitante(s), 0 membro(s) anônimo(s)