The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

using servup from another server

Discussion in 'General Discussion' started by stugster, Mar 14, 2004.

  1. stugster

    stugster Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, UK
    cPanel Access Level:
    Root Administrator
    In an attempt to provide users with detailed analysis of our server status, I am looking to be able to use the servup function remotely.

    Is it possible for me to have a page hosted on another server that can display to the visitor the status of each service?
     
  2. Born2Kill

    Born2Kill Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost or dev/null
    <?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("http://$user:$pass@$url:2086/scripts/servup",'r');

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


    use this :)
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Yikes. I think it would be better to use a third party script that does not require the root password. ;)
     
  4. stugster

    stugster Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, UK
    cPanel Access Level:
    Root Administrator
    lol, yeah.

    Can servup be run by users without root access?

    Do you know of any software that would do this?
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I would definitely suggest using a 3rd party script. Google for what you want.

    Stay away from using anything WHM/Cpanel related as ID & PW will be required -- a definite no-no.
     
Loading...

Share This Page