Comments (7)
is this happen when the $arguments is null?
from cpanel-php.
no, this happen when is has one item in array.
from cpanel-php.
Try it again
from cpanel-php.
tks guy :)
from cpanel-php.
Use dev-master instead, i still haven't pushed it as a tag. 👍
from cpanel-php.
This is still a problem because the $arguments
parameter of __call()
is always an enumerated array containing the parameters passed to the method.
$accounts = listaccts(['searchtype'=>'domain', 'search'=>'', 'exact', 'search'=>'helloworld.com']);
This would result in the following $arguments
:
array(1) {
[0]=>
array(3) {
["searchtype"]=>
string(6) "domain"
["search"]=>
string(14) "helloworld.com"
[0]=>
string(5) "exact"
}
}
Which results in the following POST request:
> POST /json-api/listaccts?0%5Bsearchtype%5D=domain&0%5Bsearch%5D=helloworld.com&0%5B0%5D=exact HTTP/1.1
from cpanel-php.
Hello,
This issue still not resolved. There is code like this:
include_once ('class.cpanel.php');
$cpanel = new Cpanel();
$account_info = $cpanel->callWHMApi('accountsummary',
[
, 'domain' => "domain.tld"
]
);
if ( isset($account_info) ) {
$result = json_decode ( $account_info, true );
$results = $result[ 'data' ][ 'acct' ][0];
$cgi_domain = $results[ 'domain' ];
$cgi_inodes = $results[ 'inodesused' ];
$cgi_mailboxes = $results[ 'maxpop' ];
$cgi_mailsperhour = $results[ 'max_email_per_hour' ];
$cgi_outgoingmail = $results[ 'outgoing_mail_suspended' ];
$cgi_suspended = $results[ 'suspended' ];
$cgi_suspend_reason = $results[ 'suspendreason' ];
$cgi_ip = $results[ 'ip' ];
$cgi_plan = $results[ 'plan' ];
$cgi_user = $results[ 'user' ];
$cgi_diskused = $results[ 'diskused' ];
$cgi_maxsql = $results[ 'maxsql' ];
$cgi_disklimit = $results[ 'diskused' ];
}
Code executed and result received, but with notice:
Notice: Undefined offset: 0
Sure, I can use "@" to supress that dirty notice, but it's not the best way...
from cpanel-php.
Related Issues (20)
- Missing security token? HOT 1
- Amazing component, only low doc
- Symfony2: Case mismatch between loaded and declared class names
- Composer package missing? Stable for production use?
- Not work example listaccts
- How call WHM API 1? I can call WHM API 0 (Deprecated), UAPI and cPanel API 2, but not WHM API 1 HOT 2
- How To Export All Domain
- how to create DB or Email account Using Cpanel-php ? HOT 1
- A function dont work
- cPanel fileman module mkfile function (api) not working.
- Create User Session 'create-user-session' HOT 2
- System requirements? HOT 2
- Readme is wrong HOT 1
- Error loading accounts HOT 1
- Error access.
- Uncaught Error: Class 'Gufy\CpanelPhp\Cpanel' not found HOT 1
- Read emails account
- gufy/cpanel-php v2.0.0 requires guzzlehttp/guzzle ~6 HOT 1
- Forbidden Access denied error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpanel-php.