Activity Stream
48,167 MEMBERS
6677 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 7 of 7
  1.     
    #1
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com

    Question Help with SolusVM Client:API...

    Hello,

    I need help with solusVM Client:API...

    I have got the example php script from their website but it doesn't seem to work. After all the tests, i think its bcz of the port 5656 but still i would like to know who has got it work.

    Here's the example php script:
    PHP Code: 
    <?php
     
    // Url to the client API
     
    $url "https://<MASTER IP>:5656/api/client";
     
    // Specify the key, hash and action
     
    $postfields["key"] = "EXAMPLE-API-KEY";
    $postfields["hash"] = "exaMpleHasH";
    $postfields["action"] = "reboot"// reboot, shutdown, boot, status
     
    // Send the query to the solusvm master
     
    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url "/command.php");
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_TIMEOUT20);
    curl_setopt($chCURLOPT_FRESH_CONNECT1);
    curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
    curl_setopt($chCURLOPT_HEADER0);
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    curl_setopt($chCURLOPT_POSTFIELDS$postfields);
    $data curl_exec($ch);
    curl_close($ch);
     
    // Parse the returned data and build an array
     
    preg_match_all('/<(.*?)>([^<]+)<\/\\1>/i'$data$match);
    $result = array();
    foreach (
    $match[1] as $x => $y)
    {
        
    $result[$y] = $match[2][$x];
    }
     
    ?>

    <?php
     
    print_r
    ($result);
     
    ?>

    <?php
     
    // Check for any errors
     
    if ($result["status"] == "error")
    {
        echo 
    $result["statusmsg"];
        exit();
    }
     
    // Display a message on a successful return
     
    if ($result["status"] == "success")
    {
        if (
    $result["statusmsg"] == "online")
        {
            echo 
    "The virtual server is online!";
        } elseif (
    $result["statusmsg"] == "offline")
        {
            echo 
    "The virtual server is offline!";
        } elseif (
    $result["statusmsg"] == "rebooted")
        {
            echo 
    "The virtual server has been rebooted!";
        } elseif (
    $result["statusmsg"] == "shutdown")
        {
            echo 
    "The virtual server has been shutdown!";
        } elseif (
    $result["statusmsg"] == "booted")
        {
            echo 
    "The virtual server has been booted!";
        }
        else
        {
            echo 
    "Status message unknown!";
        }
    }
     
    ?>
    Thanks
    -PALOOO
    Palooo 2009 Reviewed by Palooo 2009 on . Help with SolusVM Client:API... Hello, I need help with solusVM Client:API... I have got the example php script from their website but it doesn't seem to work. After all the tests, i think its bcz of the port 5656 but still i would like to know who has got it work. Here's the example php script: <?php // Url to the client API Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    I would try a manual approach for the time being, if you use this form below to send the post request to the server and see if you get the response data, when you send the form make sure your logging the headers to see if the port is actually open and if your server is returning 200 Success Code

    PHP Code: 
    <form action="https://<MASTER IP>:5656/api/client/command.php" action="post">
        <
    input type="hidden" name="key" value="API-KEY-HERE">
        <
    input type="hidden" name="hash" value="exaMpleHasH">
        <
    select name="action">
            <
    option value="reboot">Reboot</option>
            <
    option value="shutdown">Shutdown</option>
            <
    option value="boot">Boot</option>
            <
    option value="status ">Status</option>
        </
    select>
        <
    input type="submit" value="Send" />
    </
    form
    Just remember to change your key and location in the form.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  4.     
    #3
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com
    I think the port is not open.

  5.     
    #4
    Member
    Quote Originally Posted by Palooo 2009 View Post
    I think the port is not open.
    then open the port up?

  6.     
    #5
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com
    I have sent the support ticket. I think the port needs to be open on the main server.

  7.     
    #6
    Member
    Quote Originally Posted by Palooo 2009 View Post
    I have sent the support ticket. I think the port needs to be open on the main server.
    well the port doesn't have to be 5656, that is an example port.
    the port in the script has to be the same port of where solusvm is hosted. (where you usually connect).

    What exactly are you trying to do?

  8.     
    #7
    Member
    Website's:
    Rapidleech.com FullMaza.com WarezOcean.com MediaFireForum.com
    Actually i want to restart my VPS whenever i visit the php file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Other] Client
    By churongcon in forum Archive
    Replies: 1
    Last Post: 5th Jan 2012, 08:19 AM
  2. Which FTP client do you use?
    By DLow in forum General Discussion
    Replies: 42
    Last Post: 20th Jan 2011, 03:05 PM
  3. FTP client
    By rsuploader in forum Technical Help Desk Support
    Replies: 6
    Last Post: 20th Dec 2010, 03:02 PM
  4. Which p2p client do you use ?
    By DLow in forum General Discussion
    Replies: 16
    Last Post: 30th Nov 2010, 11:07 AM
  5. Which FTP Client do you use ?
    By coldabhishek in forum Polling Plaza
    Replies: 45
    Last Post: 7th Apr 2010, 11:31 AM

Tags for this Thread

BE SOCIAL