Developer Center

sync() , transfer_sync() - Domain Name Synchronization

It is used to synchronize the status, start and end times of domain name. It also enables synchronization of transferred and registered domain names.

public function sync($params=[]){
    $domain     = idn_to_ascii($params["domain"],0,INTL_IDNA_VARIANT_UTS46);

    $details    = $this->api->get_details($domain);
    if(!$details){
        $this->error = $this->api->error;
        return false;
    }

    $start              = DateManager::format("Y-m-d",$details["creation_date"]);
    $end                = DateManager::format("Y-m-d",$details["expiration_date"]);
    $status             = $details["status"];

    $return_data    = [
        'creationtime'  => $start,
        'endtime'       => $end,
        'status'        => "unknown",
    ];

    if($status == "active"){
        $return_data["status"] = "active";
    }elseif($status == "expired")
        $return_data["status"] = "expired";

    return $return_data;

}

Parameters;

  • $params Provides the value of [options] index in the $order variable in the class.

Retrieval Value;

Array
(
    [status] => unknown | active | expired | awaiting
    [creationtime] => Format: (Y-M-D) 2019-07-20
    [endtime] => Format: (Y-M-D) 2020-07-20
)
modifyAuthCode() - Update Transfer Code get_info() - Domain Name Information

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top