Esempio n. 1
0
function test6($conn, $domainname)
{
    //infodomain($conn,$domainname);
    // Current registrant = CONT1002-236937
    $registrant = createcontact($conn, 'noreply@iis.nu', '+46.123412340', 'Hostmistress', 'Not a Real Company', 'longwayhome', '76543', 'Kiruna', 'NL');
    updatedomainchangeregistrant($conn, $domainname, $registrant);
}
Esempio n. 2
0
<?php

require '../autoloader.php';
try {
    $conn = new Metaregistrar\EPP\metaregEppConnection();
    // Connect to the EPP server
    if ($conn->connect()) {
        if (login($conn)) {
            echo "Creating contact\n";
            $contactid = createcontact($conn, 'test@test.com', '+31.61234567890', 'Person name', null, 'Address 1', '12345', 'City', 'NL');
            echo "Updating {$contactid}\n";
            updatecontact($conn, $contactid, 'up@hostmax.ch', '+31.20123456789', 'Updates name', 'Updated org', 'Updated address 1', '12345', 'City', 'NL');
            logout($conn);
        }
    }
} catch (Metaregistrar\EPP\eppException $e) {
    echo $e->getMessage() . "\n";
    logout($conn);
}
function updatecontact($conn, $contactid, $email, $telephone, $name, $organization, $address, $postcode, $city, $country)
{
    /* @var $conn Metaregistrar\EPP\eppConnection.php */
    try {
        $contact = new Metaregistrar\EPP\eppContactHandle($contactid);
        $update = new Metaregistrar\EPP\eppContact();
        $update->setVoice($telephone);
        $update->setEmail($email);
        $pi = new Metaregistrar\EPP\eppContactPostalInfo($name, $city, $country, $organization, $address, null, $postcode, Metaregistrar\EPP\eppContact::TYPE_LOC);
        $update->addPostalInfo($pi);
        $up = new Metaregistrar\EPP\eppUpdateContactRequest($contact, null, null, $update);
        if (($response = $conn->writeandread($up)) instanceof Metaregistrar\EPP\eppUpdateResponse && $response->Success()) {
Esempio n. 3
0
<?php

require '../autoloader.php';
$conn = new Metaregistrar\EPP\metaregEppConnection();
// Connect to the EPP server
if ($conn->connect()) {
    if (login($conn)) {
        createcontact($conn, 'info@fryslan.frl', '+31.582925925', 'Domain Administration', 'Provincie Fryslan', 'Tweebaksmarkt 52', '8911 KZ', 'Leeuwarden', 'NL');
        logout($conn);
    }
}
function createcontact($conn, $email, $telephone, $name, $organization, $address, $postcode, $city, $country)
{
    try {
        $postalinfo = new Metaregistrar\EPP\eppContactPostalInfo($name, $city, $country, $organization, $address, null, $postcode);
        $contactinfo = new Metaregistrar\EPP\eppContact($postalinfo, $email, $telephone);
        $contactinfo->setPassword('');
        $contact = new Metaregistrar\EPP\eppCreateContactRequest($contactinfo);
        if (($response = $conn->writeandread($contact)) instanceof Metaregistrar\EPP\eppCreateResponse && $response->Success()) {
            echo "Contact created on " . $response->getContactCreateDate() . " with id " . $response->getContactId() . "\n";
            return $response->getContactId();
        }
    } catch (Metaregistrar\EPP\eppException $e) {
        echo $e->getMessage() . "\n";
    }
    return null;
}
require '../autoloader.php';
use Metaregistrar\EPP\eppConnection;
use Metaregistrar\EPP\eppException;
use Metaregistrar\EPP\eppContactPostalInfo;
use Metaregistrar\EPP\eppContact;
use Metaregistrar\EPP\eppCreateContactRequest;
/**
 * This code example creates a contact object with a registry
 */
try {
    // Please enter your own settings file here under before using this example
    if ($conn = eppConnection::create('')) {
        // Connect to the EPP server
        if ($conn->login()) {
            createcontact($conn, 'info@test.com', '+31.201234567', 'Domain Administration', 'Metaregistrar', 'Address 1', 'Zipcode', 'City', 'NL');
            $conn->logout();
        }
    }
} catch (eppException $e) {
    echo "ERROR: " . $e->getMessage() . "\n\n";
}
/**
 * @param $conn eppConnection
 * @param $email string
 * @param $telephone string
 * @param $name string
 * @param $organization string
 * @param $address string
 * @param $postcode string
 * @param $city string