Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    306
    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:
    166
    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:
    191
    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:
    306
    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,504
    Likes Received:
    1
    Trophy Points:
    318
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice