Update eppSync.php
This commit is contained in:
parent
2e11d698ee
commit
5675423dd7
1 changed files with 26 additions and 33 deletions
|
@ -29,10 +29,7 @@ try
|
||||||
|
|
||||||
foreach ($rows as $row)
|
foreach ($rows as $row)
|
||||||
{
|
{
|
||||||
// Decode the JSON string into an array
|
|
||||||
$config = json_decode($row["config"], true);
|
$config = json_decode($row["config"], true);
|
||||||
|
|
||||||
// Extract id
|
|
||||||
$registrar_id = $row["id"];
|
$registrar_id = $row["id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,15 +54,11 @@ function connectEpp(string $registry, $config)
|
||||||
{
|
{
|
||||||
$epp = new Epp();
|
$epp = new Epp();
|
||||||
$info = [
|
$info = [
|
||||||
//For EPP-over-HTTPS, 'host' => 'https://registry.example.com/epp',
|
|
||||||
"host" => $config["host"],
|
"host" => $config["host"],
|
||||||
//For EPP-over-HTTPS , port is usually 443
|
|
||||||
"port" => $config["port"], "timeout" => 30, "tls" => "1.3", "bind" => false, "bindip" => "1.2.3.4:0", "verify_peer" => false, "verify_peer_name" => false,
|
"port" => $config["port"], "timeout" => 30, "tls" => "1.3", "bind" => false, "bindip" => "1.2.3.4:0", "verify_peer" => false, "verify_peer_name" => false,
|
||||||
//For EPP-over-HTTPS , change false to 2
|
|
||||||
"verify_host" => false, "cafile" => "", "local_cert" => $config["ssl_cert"], "local_pk" => $config["ssl_key"], "passphrase" => "", "allow_self_signed" => true, ];
|
"verify_host" => false, "cafile" => "", "local_cert" => $config["ssl_cert"], "local_pk" => $config["ssl_key"], "passphrase" => "", "allow_self_signed" => true, ];
|
||||||
$epp->connect($info);
|
$epp->connect($info);
|
||||||
$login = $epp->login(["clID" => $config["username"], "pw" => $config["password"],
|
$login = $epp->login(["clID" => $config["username"], "pw" => $config["password"],
|
||||||
//'newpw' => 'testpassword2',
|
|
||||||
"prefix" => "tembo", ]);
|
"prefix" => "tembo", ]);
|
||||||
if (array_key_exists("error", $login))
|
if (array_key_exists("error", $login))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue