1. Go to this page and download the library: Download chuckbartowski/ovh-sdk 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/ */
$response = $ovh->domains()->records('example.com');
$response->success; // bool
$response->statusCode; // int
$response->data; // decoded JSON (OVHcloud often returns arrays of IDs)
$response->items(); // list form, e.g. [12, 34, 56]
$response->first(); // first item or null
$response->errorCode; // OVHcloud error code on failure, e.g. 'NOT_FOUND'
$response->as(Model::class); // hydrate a single object (bring your own model)
$response->asList(Model::class); // hydrate a collection
try {
$ovh->domains()->deleteRecord('example.com', $id);
} catch (ForbiddenException) {
// consumer key was not granted DELETE on /domain/zone/*
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.