{"id":14975397,"url":"https://github.com/zanysoft/cpanel-api","last_synced_at":"2025-10-31T09:40:12.254Z","repository":{"id":57089308,"uuid":"92508976","full_name":"zanysoft/cpanel-api","owner":"zanysoft","description":"Cpanel api","archived":false,"fork":false,"pushed_at":"2025-02-18T12:41:47.000Z","size":46,"stargazers_count":27,"open_issues_count":0,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T15:08:44.236Z","etag":null,"topics":["api","cpanel","cpanel-api","rest-api","whm","whm-api"],"latest_commit_sha":null,"homepage":"https://zanysoft.github.io/cpanel-api/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zanysoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-26T12:34:38.000Z","updated_at":"2025-02-18T12:41:50.000Z","dependencies_parsed_at":"2024-09-11T11:07:15.745Z","dependency_job_id":"ac459461-1b58-467f-b1f5-b7ac6e0f25b0","html_url":"https://github.com/zanysoft/cpanel-api","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.4545454545454546,"last_synced_commit":"66468a2b8d9f8e359fe4ff0c9810aaf3f0601a51"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanysoft%2Fcpanel-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanysoft%2Fcpanel-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanysoft%2Fcpanel-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanysoft%2Fcpanel-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanysoft","download_url":"https://codeload.github.com/zanysoft/cpanel-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cpanel","cpanel-api","rest-api","whm","whm-api"],"created_at":"2024-09-24T13:51:58.460Z","updated_at":"2025-10-31T09:40:07.235Z","avatar_url":"https://github.com/zanysoft.png","language":"PHP","readme":"# Cpanel's API\nCpanel's API 1 and 2 for Laravel\n\n## Contents\n- [Installation Guide](#installation-guide)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [Functions](#functions)\n- [Documentation](#documentation)\n\n### Installation Guide\nRequire this package in your composer.json and update composer. This will download the package.\n\n    composer require zanysoft/cpanel-api\n\nIf using \u003c Laravel 5.5, add the ServiceProvider and Aliases in config/app.php\n\n    'providers' =\u003e [\n        '...',\n        ZanySoft\\Cpanel\\CpanelServiceProvider::class,\n    ];\n    \n    'aliases' =\u003e [\n        '...',\n        'Cpanel' =\u003e ZanySoft\\Cpanel\\Facades\\Cpanel::class,\n    ];\n    \n### Configuration\nThe defaults configuration settings are set in `config/cpanel.php`. Copy this file to your own config directory to modify the values. You can publish the config using this command:\n\n    php artisan vendor:publish --provider=\"ZanySoft\\Cpanel\\CpanelServiceProvider\"\n \n### Usage\n\nYou can create a new Cpanel instance.\n\n    $cpanel = Cpanel::make();\n    $cpanel-\u003esetHost($host_ip);\n    $cpanel-\u003esetAuth($username, $password) //if you don't want to set in config file\n    return $cpanel-\u003eapi2($user, $module, $function, $args = array());\n\nOr use the facade:\n\n    return Cpanel::api2($user, $module, $function, $args = array());\n    \nYou can use the facade with chain the methods:\n\n    return Cpanel::setHost($host_ip)-\u003esetAuth($username, $password)-\u003eapi2($user, $module, $function, $args = array());\n\nYou can set the authentication before chain if you don't want to set this in config/cpanel.php file.\n\n    return Cpanel::setAuth($username, $password)-\u003eapi2($user, $module, $function, $args = array());\n    \nYou can set host, username and pasword on createing instance if you don't want to set this in config/cpanel.php file.\n\n    $cpanel = new \\ZanySoft\\Cpanel\\Cpanel($host,$username, $password);\n    // OR\n    $cpanel = Cpanel::make($host,$username, $password);\n\n### Functions\nThis is the example when you want to define your configuration\n\n```php\n  \u003c?php\n    $cpanel = App::make('cpanel');\n    $cpanel-\u003esetHost($host_ip);\n    $cpanel-\u003esetAuth($username, $password)\n    return $cpanel-\u003eapi2($user, $module, $function, $args = array());\n```\n\nIf you like to get some list accounts from cPanel/WHM\n```php\n\t\u003c?php\n\n\t$accounts = $cpanel-\u003elistaccts();\n\t// passing parameters\n\t$accounts = $cpanel-\u003elistaccts($searchtype, $search);\n\t\n```\nIf you want to create new subdomain\n```php\n\t\u003c?php\n\t\n\t// createSubdomain(Domain Name, Username, Dubdomain Directory, Main Domain)\n         $cpanel-\u003ecreateSubdomain('subdomain', 'username', '/public_html/subdomain', 'example.com')\n```\n\n\nFor accessing cPanel API 2, you can use this.\n\n```php\n\t\u003c?php\n\t\n\treturn $cpanel-\u003eapi2($user, $module, $function, $args = array());\n```\n\n\nFor accessing cPanel API 1, you can use this.\n```php\n\t\u003c?php\n\t\n\treturn $cpanel-\u003eapi1($user, $module, $function, $args = array());\n```\n\n### Documentation\n\n Visit this link for api2 options: https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+2\n\n Visit this link for api1 options: https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+1\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanysoft%2Fcpanel-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanysoft%2Fcpanel-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanysoft%2Fcpanel-api/lists"}