Skip to content
This repository was archived by the owner on Sep 6, 2020. It is now read-only.
This repository was archived by the owner on Sep 6, 2020. It is now read-only.

Not work example listaccts #18

Description

@abkrim

Write a pice of code with example on Laravel 5.3

...
use Gufy\CpanelPhp\Cpanel;

...
$whmuser = 'root';
$hash    = $this->hash;  // hash on one line and correct hash
$host    = $this->host;  // my cpanel host
$port    = $this->port; // port 2087

$cpanel = new Cpanel([
            'host'      => $this->host.':'.$port:,
            'username'  => 'root',
            'auth_type' => 'hash',
            'password'  => $this->hash,
        ]);
        // @todo refactor for errors
       var_dump($cpanel->listaccts());

Result not json listaccts ->>

<!DOCTYPE html>\n
<html dir="ltr">\n
<head>\n
<title>hq &ndash; WebHost Manager</title>\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n
<link rel="shortcut icon" href="/cPanel_magic_revision_1448314783/favicon.ico" type="image/x-icon">\n
\n
<script src="/cPanel_magic_revision_1448314781/yui-gen/utilities_json/utilities_json.js"></script>\n
<script>\n
top._LOADAVG_TIMEOUT = 5 * 60 * 1000;   //5 minutes\n
function set_last_activity() {\n
    top._LAST_ACTIVITY = new Date();\n
}\n
set_last_activity();\n
\n
YAHOO.util.Event.onDOMReady( function() {\n
    var these_frames = top.document.getElementsByTagName("frame");\n
    for (var f=these_frames.length-1; f>-1; f--) {\n
        var the_frame = these_frames[f];\n
        YAHOO.util.Event.addListener( the_frame.contentWindow, "load", function() {\n
            YAHOO.util.Event.addListener(this.document.body, "mousemove", set_last_activity);\n
            YAHOO.util.Event.addListener(this.document.body, "keyup", set_last_activity);\n
            YAHOO.util.Event.addListener(this.document.body, "keydown", set_last_activity);\n
        } );\n
    }\n
} );\n
</script>\n
</head>\n
\n
<frameset cols="*" frameborder="NO" border="0" framespacing="0" rows="78,*">\n
    <frame src="/scripts/command?PFILE=topframe" name="topFrame" frameborder="no" scrolling="no" noresize id="topFrame"/>\n
                \n
        <frameset rows="*" cols="217,556*" framespacing="0" frameborder="no" border="0">\n
            <frame src="/scripts/command?PFILE=command" name="commander" frameborder="no" scrolling="no" id="commander" />\n
            <frame src="/scripts/command?PFILE=main" name="mainFrame" id="mainFrame" frameborder="no"/>\n
        </frameset>\n
        \n
    \n
</frameset>\n
<noframes>WebHost Manager requires frames, but your browser does not support them.</noframes>\n
</html>\n
<!-- Web Host Manager 11.58.0.32 [10] (c) cPanel, Inc. 2016\n
            http://cpanel.net/  Unauthorized copying is prohibited -->\n


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions