apiv6.php 668 B

12345678910111213141516171819202122232425
  1. <?php
  2. require __DIR__ . '/vendor/autoload.php';
  3. use \Ovh\Api;
  4. // Informations about your application
  5. $applicationKey = "your_app_key";
  6. $applicationSecret = "your_app_secret";
  7. $consumer_key = "your_consumer_key";
  8. // Information about API and rights asked
  9. $endpoint = 'ovh-eu';
  10. // Information about your web hosting
  11. $web_hosting = 'my_domain';
  12. // Get servers list
  13. $conn = new Api( $applicationKey,
  14. $applicationSecret,
  15. $endpoint,
  16. $consumer_key);
  17. $hosting = $conn->get('/hosting/web/' . $web_hosting );
  18. print_r( $conn->get('/hosting/web/offerCapabilities', array( 'offer' => $hosting['offer'] ) ) );
  19. ?>