PHP code example of sebastka / domeneshop-dashboard
1. Go to this page and download the library: Download sebastka/domeneshop-dashboard 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/ */
sebastka / domeneshop-dashboard example snippets
use Sebastka\Domeneshop\Dashboard\DashboardClient;
use Sebastka\Domeneshop\Dashboard\Exception\PageUnavailableException;
use Sebastka\Domeneshop\Dashboard\Exception\SessionExpiredException;
use Sebastka\Domeneshop\Dashboard\Exception\UnexpectedPageException;
$dashboard = new DashboardClient($cookie);
try {
$ns = $dashboard->nameservers()->forDomain(1234567);
$ns->hosts; // ['ns1.hyp.net', 'ns2.hyp.net', 'ns3.hyp.net']
$ns->dnssec; // true
$status = $dashboard->dnssec()->statusForDomain(1234567);
$status->records; // list<DsRecord>, or null when Domeneshop manages them
$dashboard->glue()->forDomain(1234567); // list<GlueRecord>
$dashboard->contacts()->forDomain(1234567); // owner, admin, tech, billing
} catch (SessionExpiredException) {
// Re-capture the cookie.
} catch (PageUnavailableException) {
// The dashboard does not offer that page for this domain.
} catch (UnexpectedPageException) {
// The dashboard changed. Never treat this as "no data".
}
ini
dashboard_cookie = "..."
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.