拘留/幻想许可

v2.0.0 2019-04-04 08:51 UTC

This package is auto-updated.

Last update: 2024-09-29 01:39:13 UTC


README

类,用于与Fantastico许可API接口交互,以管理Fantastico服务器和VPS许可类型。更多信息请访问https://www.netenberg.com/fantastico.php

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads Reference Status Build Status Code Climate Scrutinizer Code Quality Codacy Badge

安装

使用Composer安装,如下所示

composer require detain/fantastico

基本用法

初始化

通过传递API凭证进行初始化,如下所示

use detain\Fantastico;

$fantastico = new Fantastico('API Username', 'API Password');

列出许可的IP地址

$details = $fantastico->getIpListDetailed(Fantastico::ALL_TYPES);

注意 返回一个包含许可条目的数组,每个条目都是一个类似数组的对象

[
	'ipAddress' => '194.116.187.120',
	'addedOn' => '2009-05-05 19:39:32',
	'isVPS' => 'No',
	'status' => 'Active'
]

创建新的许可

为给定的IP地址添加许可。

注意 类型1 = 服务器,类型2 = VPS

$result = $fantastico->addIp('66.45.228.200', 1);

更改许可的IP地址

注意 在此示例中,'192.168.1.1' 是原始(旧)IP地址,'192.168.1.2' 是更新(新)IP地址

$result = $fantastico->editIp('192.168.1.1', '192.168.1.2')

许可

Fantastico许可类采用LGPL-v2.1许可。