{"id":20127309,"url":"https://github.com/burakboz/cyberlink","last_synced_at":"2025-05-06T18:31:29.479Z","repository":{"id":62498242,"uuid":"210087542","full_name":"BurakBoz/CyberLink","owner":"BurakBoz","description":"A php library to utilize CyberPanel without API.","archived":false,"fork":false,"pushed_at":"2023-08-31T08:45:35.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T05:01:37.178Z","etag":null,"topics":["api","automation","controlpanel","cyberpanel","library","php","webserver"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BurakBoz.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG","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}},"created_at":"2019-09-22T03:56:23.000Z","updated_at":"2025-03-07T19:59:45.000Z","dependencies_parsed_at":"2022-11-02T11:46:51.535Z","dependency_job_id":"5fffe417-16f7-45e0-9fae-3845123f1700","html_url":"https://github.com/BurakBoz/CyberLink","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurakBoz%2FCyberLink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurakBoz%2FCyberLink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurakBoz%2FCyberLink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurakBoz%2FCyberLink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BurakBoz","download_url":"https://codeload.github.com/BurakBoz/CyberLink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252744472,"owners_count":21797627,"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","automation","controlpanel","cyberpanel","library","php","webserver"],"created_at":"2024-11-13T20:20:26.276Z","updated_at":"2025-05-06T18:31:29.162Z","avatar_url":"https://github.com/BurakBoz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CyberLink for CyberPanel\n## A php library to utilize CyberPanel without API.\n[Take a look](https://cyberpanel.docs.apiary.io/) to CyberPanel api documentation, yes almost nothing.\n```\nCurrently CyberPanel doesn't have API functions fully described and implemented.\nSo I wrote this library.\n```\n\n##Composer Install\n`composer require burakboz/cyberlink:dev-master`\n\n##Example usage\n```\n// If you need public key auth on ssh connection provide private key string to $key parameter otherwise it should be null.\n// $enableSecureFTP parameter should be true for using setCustomSSL method. \n// If you don't need this don't set it true.\n$ip         = \"127.0.0.1\";\n$user       = \"root\"; // use only root user\n$password   = \"TopSecretPassword\"; // root password\n$port       = 22; // ssh port\n$timeout    = 20; // connection timeout\n$enableSecureFTP = false; // set it true if you use $cyberlink-\u003esetCustomSSL() method.\n$cyberlink  = new \\BurakBoz\\CyberLink($ip, $user, $password, $key = null, $port = 22, $timeout = 10, $enableSecureFTP = false);\n$phpVersion = \"7.3\";\n$owner      = \"admin\";\n$package    = \"Default\";\ntry\n{\n    if($cyberlink-\u003ecreateWebsite(\"merhaba.com\", \"admin@siteowner.com\", $package, $owner, $phpVersion))\n    {\n        echo \"Host created.\";\n    }\n    else\n    {\n        echo \"Error: \" . $cyberlink-\u003egetLastMessage();\n    }\n}\ncatch (Exception $e)\n{\n    echo \"Error: \" . $e-\u003egetMessage();\n}\n```\n\n### What is the magic of this library?\n#### Website Functions\n##### createWebsite\n```\n/**\n * @param        $domainName\n * @param        $email\n * @param string $package\n * @param string $owner\n * @param string $phpVersion\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreateWebsite($domainName, $email, $package = self::package, $owner = self::owner, $phpVersion = self::phpVersion);\n```\n\n##### deleteWebsite\n```\n/**\n * @param $domainName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003edeleteWebsite($domainName);\n```\n\n##### createChild\n```\n/**\n * @param        $masterDomain\n * @param        $childDomain\n * @param string $owner\n * @param string $phpVersion\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreateChild($masterDomain, $childDomain, $owner = self::owner, $phpVersion = self::phpVersion);\n```\n\n##### deleteChild\n```\n/**\n * @param $childDomain\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003edeleteChild($childDomain);\n```\n\n##### listWebsites\n```\n/**\n * @return mixed\n */\n$cyberlink-\u003elistWebsites();\n```\n\n##### changePHP\n```\n/**\n * @param        $domainName\n * @param string $phpVersion\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003echangePHP($domainName, $phpVersion = self::phpVersion);\n```\n\n##### changePackage\n```\n/**\n * @param        $domainName\n * @param string $packageName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003echangePackage($domainName, $packageName = self::package);\n```\n#### DNS Functions\n###### Not Implemented yet.\n\n#### Backup Functions\n##### createBackup\n```\n/**\n * @param $domainName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreateBackup($domainName);\n```\n##### restoreBackup\n```\n/**\n * @param $domainName\n * @param $fileName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003erestoreBackup($domainName, $fileName);\n```\n\n#### Package Functions\n##### createPackage\n```\n/**\n * @param        $packageName\n * @param int    $diskSpace\n * @param int    $bandwidth\n * @param int    $emailAccounts\n * @param int    $dataBases\n * @param int    $ftpAccounts\n * @param int    $allowedDomains\n * @param string $owner\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreatePackage($packageName, $diskSpace = 1000, $bandwidth = 10000, $emailAccounts = 100, $dataBases = 100, $ftpAccounts = 100, $allowedDomains = 100, $owner = self::owner);\n```\n##### deletePackage\n```\n/**\n * @param $packageName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003edeletePackage($packageName);\n```\n##### listPackages\n```\n/**\n * @return mixed\n */\n$cyberlink-\u003elistPackages();\n```\n\n#### Database Functions\n##### createDatabase\n```\n/**\n * @param $databaseWebsite\n * @param $dbName\n * @param $dbUsername\n * @param $dbPassword\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreateDatabase($databaseWebsite, $dbName, $dbUsername, $dbPassword);\n```\n##### deleteDatabase\n```\n/**\n * @param $dbName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003edeleteDatabase($dbName);\n```\n##### listDatabases\n```\n/**\n * @param $databaseWebsite\n * @return mixed\n */\n$cyberlink-\u003elistDatabases($databaseWebsite);\n```\n#### Email Functions\n###### Not Implemented yet.\n#### FTP Functions\n##### createFTPAccount\n```\n/**\n * @param        $domainName\n * @param        $userName\n * @param        $password\n * @param string $owner\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ecreateFTPAccount($domainName, $userName, $password, $owner = self::owner);\n```\n##### deleteFTPAccount\n```\n/**\n * @param $userName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003edeleteFTPAccount($userName);\n```\n##### changeFTPPassword\n```\n/**\n * @param $userName\n * @param $password\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003echangeFTPPassword($userName, $password);\n```\n##### listFTP\n```\n/**\n * @param $domainName\n * @return mixed\n */\n$cyberlink-\u003elistFTP($domainName);\n```\n#### SSL Functions\n##### issueSSL\n```\n/**\n * @param $domainName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003eissueSSL($domainName);\n```\n##### hostNameSSL\n```\n/**\n * @param $domainName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003ehostNameSSL($domainName);\n```\n##### mailServerSSL\n```\n/**\n * @param $domainName\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003emailServerSSL($domainName);\n```\n#### Extra Functions\n\n##### Set Custom SSL\n```\n/**\n * Warning! This method shouldn't be trusted. In future versions of CyberPanel (Currently 1.9) and LiteSpeed may cause system failure. Use at your own risk.\n * @param $domain\n * @param $publicKey\n * @param $privateKey\n * @return bool\n * @throws Exception\n */\n$cyberlink-\u003esetCustomSSL($domain, $publicKey, $privateKey);\n```\n##### Reset CyberPanel Admin Password\n```\n/**\n * @param $password\n * @return string\n */\n$cyberlink-\u003eresetAdminPassword($password);\n```\n##### Upgrade CyberPanel\n```\n/**\n * @return string\n */\n$cyberlink-\u003eupgradeCyberPanel();\n```\n##### Restart LiteSpeed\n```\n/**\n * @return string\n */\n$cyberlink-\u003erestartLiteSpeed();\n```\n##### Reboot Server\n```\n/**\n * @return string\n */\n$cyberlink-\u003erebootServer();\n```\n##### Server Uptime\n```\n/**\n * @return string\n */\n$cyberlink-\u003euptime();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburakboz%2Fcyberlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburakboz%2Fcyberlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburakboz%2Fcyberlink/lists"}