mirror of
https://github.com/ovh/php-ovh.git
synced 2023-11-05 03:20:26 +01:00
16fabb2bfb
Signed-off-by: Vincent Casse <vincent.casse@corp.ovh.com>
26 lines
668 B
PHP
26 lines
668 B
PHP
<?php
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
use \Ovh\Api;
|
|
|
|
// Informations about your application
|
|
$applicationKey = "your_app_key";
|
|
$applicationSecret = "your_app_secret";
|
|
$consumer_key = "your_consumer_key";
|
|
|
|
// Information about API and rights asked
|
|
$endpoint = 'ovh-eu';
|
|
|
|
// Information about your web hosting
|
|
$web_hosting = 'my_domain';
|
|
|
|
// Get servers list
|
|
$conn = new Api( $applicationKey,
|
|
$applicationSecret,
|
|
$endpoint,
|
|
$consumer_key);
|
|
$hosting = $conn->get('/hosting/web/' . $web_hosting );
|
|
|
|
print_r( $conn->get('/hosting/web/offerCapabilities', array( 'offer' => $hosting['offer'] ) ) );
|
|
|
|
?>
|