1
0
mirror of https://github.com/ovh/php-ovh.git synced 2023-11-05 03:20:26 +01:00
php-ovh/examples/hosting-getCapabilities/apiv6.php
Vincent Casse 16fabb2bfb Add hosting get capabilities example
Signed-off-by: Vincent Casse <vincent.casse@corp.ovh.com>
2016-01-11 18:32:20 +01:00

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'] ) ) );
?>