Ir para conteúdo
View in the app

A better way to browse. Learn more.

Portal do Host

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ajuda No Whmcs E Servidor Linux

Featured Replies

Postado

Galera, eu Quero mostrar no meu WHMCS o Uptime do meu servidor de TeamSpeak 3,

 

Exixte alguma coisa que eu consiga fazer isso pois eu não trabalho nele com cpanel, whm, nada disso o WHMCS teria que entrar no meu servidor e coletar o uptime.


Postado

você pode fazer usando php SSH2 para conectar ao servidor e pegar o uptime.


Postado
  • Autor

Como faço isso?

Enviado de meu GT-I8190L usando Tapatalk


Postado

Como faço isso?

Enviado de meu GT-I8190L usando Tapatalk

 

depende de onde e como que mostrar essa informação para adaptar ao whmcs. Mas conectar com o servidor usando PHP é relativamente facil. Segue um exemplo.

<?php

    $server = "serverB.example.org";
    //hostname ou IP

    //specify your username
    $username = "root";

    //select port to use for SSH
    $port = "22";

    //command that will be run on server B
    $command = "uptime";

    //form full command with ssh and command, you will need to use links above for auto authentication help
    $cmd_string = "ssh -p ".$port." ".$username."@".$server." ".$command;

    //this will run the above command on server A (localhost of the php file)
    exec($cmd_string, $output);

    //return the output to the browser
    //This will output the uptime for server B on page on server A
    echo '<pre>';
    print_r($output);
    echo '</pre>';
?>

Postado

Bacana esse script @fernandoguga. Vou fazer um teste depois.

 

Abraços! :)


Visitante
Este tópico está impedido de receber novos posts.

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Informação Importante

Concorda com os nossos termos?

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.