The docs show this at http://www.virtualizor.com/wiki/API_Create_VPS:
PHP Code $output = $admin->addvs($post);
//Use this call instead if creating VPS on Slave Server
//$output = $admin->addvs($post, $cookies);
However the second parameter is required:
PHP Code function addvs($post, $cookies){
$path = 'index.php?act=addvs';
$post = $this->clean_post($post);
$ret = $this->call($path, '', $post, $cookies);
return array(
'title' => $ret['title'],
'error' => @empty($ret['error']) ? array() : $ret['error'],
'vs_info' => $ret['newvs'],
'globals' => $ret['globals']
);
}
The docs should read PHP Code $output = $admin->addvs($post, []);
or the $cookies parameter should default to an empty array.
|