-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a new file to the fantastico class
git-svn-id: https://creation.interserver.net/svn/fantastico_api_class/trunk@36 e50fb3bb-1a16-4cda-9616-a351a258ac06
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Fantastico Licensing API | ||
|
||
## Installation | ||
|
||
Install with composer like | ||
|
||
```sh | ||
composer require detain/fantastico | ||
``` | ||
|
||
## Basic Usage | ||
|
||
### Initialization | ||
|
||
Initialize passing the API credentials like | ||
|
||
```php | ||
use detain\Fantastico; | ||
|
||
$fantastico = new Fantastico('API Username', 'API Password'); | ||
``` | ||
|
||
### List Licensed IPs | ||
|
||
```php | ||
$details = $fantastico->getIpListDetailed(Fantastico::ALL_TYPES); | ||
```; | ||
|
||
***Note*** Returns an array of license entries, each entry being an array like | ||
|
||
```php | ||
[ | ||
'ipAddress' => '194.116.187.120', | ||
'addedOn' => '2009-05-05 19:39:32', | ||
'isVPS' => 'No', | ||
'status' => 'Active' | ||
] | ||
``` | ||
|
||
### Create a new License | ||
|
||
Add a license for a given IP. | ||
|
||
***Note*** Type 1 = Server, Type 2 = VPS | ||
|
||
```php | ||
$result = $fantastico->addIp('66.45.228.200', 1); | ||
``` | ||
|
||
### Change The IP for a License | ||
|
||
***Note*** In this example '192.168.1.1' is the original (old) ip and '192.168.1.2' is the updated (new) IP | ||
|
||
```php | ||
$result = $fantastico->editIp('192.168.1.1', '192.168.1.2') | ||
``` | ||
|
||
## License | ||
|
||
Fantastico Licensing class is licensed under the LGPL-v2 license. | ||
|