Skip to content

Commit

Permalink
Create DomainReport.php
Browse files Browse the repository at this point in the history
  • Loading branch information
getpinga authored Feb 16, 2023
1 parent 6ae2241 commit 6725818
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions examples/DomainReport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* Tembo EPP client test file
*
* Written in 2023 by Taras Kondratyuk (https://getpinga.com)
* Based on xpanel/epp-bundle written in 2019 by Lilian Rudenco ([email protected])
*
* @license MIT
*/

// Include the Composer autoloader
require_once '../vendor/autoload.php';
require_once 'Connection.php';

// Use the Epp class from your package
use Pinga\Tembo\Epp;
use Pinga\Tembo\EppClient;
use Pinga\Tembo\HttpsClient;

try
{
$epp = connectEpp();

$params = array(
'domainname' => 'test.example'
);
$domainReport = $epp->domainReport($params);

if (array_key_exists('error', $domainReport))
{
echo 'DomainReport Error: ' . $domainReport['error'] . PHP_EOL;
}
else
{
echo "DomainReport result: " . $domainReport['code'] . ": " . $domainReport['msg'] . PHP_EOL;
}

$logout = $epp->logout();

echo 'Logout Result: ' . $logout['code'] . ': ' . $logout['msg'][0] . PHP_EOL;
}
catch(EppException $e)
{
echo 'Error: ', $e->getMessage();
}

0 comments on commit 6725818

Please sign in to comment.