$newContact->street = $_POST[$type]['street'];
                $newContact->number = $_POST[$type]['number'];
                $newContact->postalCode = $_POST[$type]['postalCode'];
                $newContact->city = $_POST[$type]['city'];
                $newContact->country = $_POST[$type]['country'];
                $newContact->phoneNumber = $_POST[$type]['phoneNumber'];
                $newContact->faxNumber = $_POST[$type]['faxNumber'];
                $newContact->email = $_POST[$type]['email'];
                // Add new contact to the list
                $newContacts[] = $newContact;
            }
            // Set contacts for the domain by using the Transip_DomainService API;
            Transip_DomainService::setContacts($domain, $newContacts);
        }
        // Request the locked status of a domain by using the Transip_DomainService API;
        $info = Transip_DomainService::getInfo($domain);
        // The Transip_Domain object contains an array of Transip_WhoisContact objects
        // Each Transip_WhoisContact object has one of three types
        // Iterate through contacts and save in array
        foreach ($info->contacts as $contact) {
            $contacts[$contact->type] = $contact;
        }
    } catch (SoapFault $e) {
        // It is possible that an error occurs when connecting to the TransIP Soap API,
        // those errors will be thrown as a SoapFault exception.
        $error = 'An error occurred: ' . htmlspecialchars($e->getMessage());
    }
} else {
    $domain = '';
    $isLocked = false;
}
<?php

/**
 * This example gets information about a domain name.
 *
 * @copyright Copyright 2011 TransIP BV
 * @author TransIP BV <*****@*****.**>
 */
require_once 'Transip/DomainService.php';
if (isset($_GET['domain']) && strlen($_GET['domain']) > 0) {
    $domainName = $_GET['domain'];
    try {
        // Request information about a domain in your account by using the TransIP
        // DomainService API; A domain Object will be returned holding all
        // information available about the domain.
        $domain = Transip_DomainService::getInfo($domainName);
        // INFO: A domain object holds all data directly available for a domain:
        //		 + it has a list of nameservers,
        //		 + a list of whois-contacts
        //		 + a list of dns-entries if the domain is using TransIP nameservers
        //		 + and, optionally, a Transip_DomainBranding object that holds
        //			information about branding (see reseller info for more)
        //
        // The domain object does not include registrar-lock and auth/epp-code
        // information, since this information will always be fetched real-time
        // from the registry. To get this information, you can use the
        // getIsLocked() and getAuthCode API calls.
        $result = 'We got the following information about the domain ' . htmlspecialchars($domainName) . ':';
    } catch (SoapFault $e) {
        // It is possible that an error occurs when connecting to the TransIP Soap API,
        // those errors will be thrown as a SoapFault exception.