Example #1
0
 *
 * You can specify multiple domain names to be checked
 */
if ($argc <= 1) {
    echo "Usage: infodomain.php <domainname>\n";
    echo "Please enter a domain name retrieve\n\n";
    die;
}
$domainname = $argv[1];
echo "Retrieving info on " . $domainname . "\n";
try {
    $conn = new Metaregistrar\EPP\metaregEppConnection();
    // Connect to the EPP server
    if ($conn->connect()) {
        if (login($conn)) {
            infodomain($conn, $domainname);
            logout($conn);
        }
    } else {
        echo "ERROR CONNECTING\n";
    }
} catch (Metaregistrar\EPP\eppException $e) {
    echo "ERROR: " . $e->getMessage() . "\n\n";
}
function infodomain($conn, $domainname)
{
    try {
        $epp = new Metaregistrar\EPP\eppDomain($domainname);
        $info = new Metaregistrar\EPP\eppInfoDomainRequest($epp);
        if (($response = $conn->writeandread($info)) instanceof Metaregistrar\EPP\eppInfoDomainResponse && $response->Success()) {
            /* @var $response Metaregistrar\EPP\eppInfoDomainResponse */
 * This script retrieves all information for a specific domain name
 */
if ($argc <= 1) {
    echo "Usage: infodomain.php <domainname>\n";
    echo "Please enter a domain name retrieve\n\n";
    die;
}
$domainname = $argv[1];
echo "Retrieving info on " . $domainname . "\n";
try {
    // Please enter your own settings file here under before using this example
    if ($conn = eppConnection::create('pt.ini', true)) {
        // Connect to the EPP server
        if ($conn->login()) {
            $roid = '12345';
            $result = infodomain($conn, $domainname, $roid);
            $conn->logout();
        }
    }
} catch (Metaregistrar\EPP\eppException $e) {
    echo "ERROR: " . $e->getMessage() . "\n\n";
}
/**
 * @param $conn Metaregistrar\EPP\eppConnection
 * @param $domainname string
 * @return string
 */
function infodomain($conn, $domainname, $roid)
{
    try {
        $domain = new eppDomain($domainname);
Example #3
0
 * This script checks for the availability of domain names
 *
 * You can specify multiple domain names to be checked
 */
if ($argc <= 1) {
    echo "Usage: infodomain.php <domainname>\n";
    echo "Please enter a domain name retrieve\n\n";
    die;
}
echo "Retrieving info on " . $domainname . "\n";
try {
    $conn = new Metaregistrar\EPP\metaregEppConnection();
    $conn->setConnectionDetails('');
    // Connect to the EPP server
    if ($conn->login()) {
        $result = infodomain($conn, $domainname);
        $conn->logout();
    }
} catch (Metaregistrar\EPP\eppException $e) {
    echo "ERROR: " . $e->getMessage() . "\n\n";
}
/**
 * @param $conn Metaregistrar\EPP\eppConnection
 * @param $domainname string
 * @return string
 */
function infodomain($conn, $domainname)
{
    try {
        $epp = new Metaregistrar\EPP\eppDomain($domainname);
        $info = new Metaregistrar\EPP\eppInfoDomainRequest($epp);
Example #4
0
function updatedomainsetclientdelete($conn, $domainname, $clientdelete)
{
    try {
        $domain = new Metaregistrar\EPP\eppDomain($domainname);
        $up = new Metaregistrar\EPP\iisEppUpdateDomainClientDeleteRequest($domain, $clientdelete);
        if (($response = $conn->writeandread($up)) instanceof Metaregistrar\EPP\eppUpdateResponse && $response->Success()) {
            echo "Domain {$domainname} updated, infoing\n";
            infodomain($conn, $domainname);
        }
    } catch (Metaregistrar\EPP\eppException $e) {
        echo $e->getMessage() . "\n";
    }
}