承接 vortechstudio/aapanel-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vortechstudio/aapanel-api

Composer 安装命令:

composer require vortechstudio/aapanel-api

包简介

API Client AAPanel with PHP Version 7.0.21 or higher

README 文档

README

API Client AAPanel with PHP Version min 8++

aaPanel API PHP Client

A PHP client library for interacting with the aaPanel API.

Features

  • Fetch logs from the API.
  • Add a new site.
  • Update a run path site.
  • Check a run path site
  • Add a subdomain.
  • Delete a subdomain.
  • Fetch list of FTP accounts.
  • Add a new FTP account.
  • Delete an FTP account.
  • Import SQL file into a database.
  • Apply SSL certificate to a domain.
  • Renew SSL certificate for a domain.
  • Upload Cert SSL for a domain.
  • Get SSL details for a domain and return the 'cert, key, other information' value.
  • Enable HTTPS redirection for a site.
  • Disable a site.
  • Enable a site.

Installation

Install the library using Composer:

composer require alfikripayakumbuh/aapanel-api

Usage

Initialize the Client

require_once 'vendor/autoload.php';

use AlfikriPayakumbuh\AAPanelAPI\aaPanelApiClient;

$apiKey = 'your_api_key'; // get the api key from the settings aapanel
$baseUrl = 'https://example.com:8888'; // Replace with your aaPanel API base URL
$pathCookie = './'; // want save cookie file
$client = new aaPanelApiClient($apiKey, $baseUrl, $pathCookie);

Functionality

Fetch Logs

Fetches logs from the API.

$logs = $client->fetchLogs();
var_dump($logs);

Add a New Site

Adds a new site to aaPanel.

$response = $client->addSite(domain: 'example.com', path: '/home/project', runPath='/public', type: 2, phpVersion: '84', setSsl: 1);
var_dump($response);

Update a run path site

Update a run path site domain.

$response = $client->updateRunPath(id: '123', runPath='/public');
var_dump($response);

Check a run path site

Check run path site domain.

$response = $client->checkRunPath(domain: 'example.com');
var_dump($response);

Add a Subdomain

Adds a subdomain to an existing domain.

$response = $client->addSubdomain('subdomain', 'example.com', '192.168.1.1');
var_dump($response);

Delete a Subdomain

Deletes a subdomain from an existing domain.

$response = $client->deleteSubdomain('subdomain', 'example.com', '192.168.1.1');
var_dump($response);

Fetch FTP Accounts

Fetches a list of FTP accounts.

$ftpAccounts = $client->fetchFtpAccounts();
var_dump($ftpAccounts);

Add FTP Account

Adds a new FTP account.

$response = $client->addFtpAccount('ftpuser', 'ftppassword');
var_dump($response);

Delete FTP Account

Deletes an FTP account.

$response = $client->deleteFtpAccount('ftpuser');
var_dump($response);

Apply SSL Certificate

Applies an SSL certificate to a domain.

$response = $client->applySslCertificate(domain: 'example.com', domainId: 123, $autoWildcard: 0);
var_dump($response);

Renew SSL Certificate

Renews an SSL certificate for a domain.

$response = $client->renewCert('example.com');
var_dump($response);

Get Hash Domain

Gets hash for a domain.

$hash = $client->getHashValue('example.com');
var_dump($hash);

Get SSL Details

Gets SSL details for a domain.

$response = $client->getSSLDetails('example.com');
var_dump($response);

Upload key cert SSL

Upload key and cert SSL certificate for a domain if available from your computer.

$response = $client->uploadCert('example.com', 'key', 'cert');
var_dump($response);

Enable HTTPS Redirection

Enables HTTPS redirection for a site.

$response = $client->enableHttpsRedirection('example.com');
var_dump($response);

Disable Site

Disables a site.

$response = $client->disableSite(1, 'example.com');
var_dump($response);

Enable Site

Enables a site.

$response = $client->enableSite(1, 'example.com');
var_dump($response);

Get FTP Account Details

Retrieves details of a specific FTP account.

$details = $client->getFtpAccountDetails('ftpuser');
var_dump($details);

Set Server Config

Sets server configuration parameters.

$config = [
    'param1' => 'value1',
    'param2' => 'value2'
];
$response = $client->setServerConfig($config);
var_dump($response);

Get Server Config

Gets server configuration parameters.

$config = $client->getServerConfig();
var_dump($config);

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 Alfikri

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vortechstudio/aapanel-api 适用场景与选型建议

vortechstudio/aapanel-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 08 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 vortechstudio/aapanel-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vortechstudio/aapanel-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 vortechstudio/aapanel-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-27