PHP code example of i-kostiuk / time4vps-api

1. Go to this page and download the library: Download i-kostiuk/time4vps-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

i-kostiuk / time4vps-api example snippets


use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);

use Time4Vps\Time4Vps;

($username, $password);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$details = $client->getDetails();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$details = $client->setDetails([
        "type" => "typeValue",
        "companyname" => "companynameValue",
        "companyregistrationnumber" => "companyregistrationnumberValue",
        "vateu" => "vateuValue",
        "email" => "emailValue",
        "firstname" => "firstnameValue",
        "lastname" => "lastnameValue",
        "country" => "countryValue",
        "address1" => "address1Value",
        "city" => "cityValue",
        "state" => "stateValue",
        "postcode" => "postcodeValue",
        "phonenumber" => "phonenumberValue",
        "emarketing" => "emarketingValue"
    ]);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$contacts = $client->getContacts();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$contact = $client->getContactDetails($contact_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$notifications = $client->getNotifications();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$notifications = $client->getNotificationsNew();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$notification = $client->markNotificationsAsRead($notification_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$balance = $client->getBalance();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$invoices = $client->getInvoices();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$invoice = $client->getInvoice($invoice_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$payments = $client->getPayments();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$payments = $client->getPaymentsFees();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$services = $client->getServices();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$service_label = $client->getServiceLabel($service_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$response = $client->setServiceLabel($service_id, $new_label);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$categories = $client->getProductCategories();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$products = $client->getProductsInCategory($category_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$product = $client->getProductDetails($product_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$vps_products = $client->getAvailableVps();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$dns = $client->getDns();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$dns = $client->getDnsDetails($service_id, $zone_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$certificates = $client->getCertificates();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$servers = $client->getServers();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$server = $client->getServerDetails($server_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$server_os = $client->getServerAvailableOsList($server_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$server_ips = $client->getServerAdditionalIps($server_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$history = $client->getServerUsageHistory($server_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$scripts = $client->getScripts();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$script = $client->getScript($script_id);

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$vpn_servers = $client->getVpnServers();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$vpn_clients = $client->getVpnClients();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$vpn_login_details = $client->getVpnLoginDetails();

use Time4Vps\Time4Vps;

$client = new Time4Vps($username, $password);
$vpn_usage_history = $client->getVpnUsageHistory($id);