use Metaregistrar\EPP\eppCreateHostRequest; use Metaregistrar\EPP\ficoraEppCheckBalanceRequest; use Metaregistrar\EPP\ficoraEppCheckBalanceResponse; use Metaregistrar\EPP\eppPollRequest; use Metaregistrar\EPP\eppPollResponse; /* * This script checks for the availability of domain names * You can specify multiple domain names to be checked */ $domains = ['ewoutdegraaf.fi']; try { if ($conn = eppConnection::create('settings.ini', false)) { // Connect and login to the EPP server if ($conn->login()) { echo "Checking balance\n"; checkbalance($conn); echo "Checking poll\n"; checkpoll($conn); // Check domain names echo "Checking " . count($domains) . " domain names\n"; checkdomains($conn, $domains); echo "Checking contact\n"; checkcontact($conn, 'C5525'); echo "Checking hosts\n"; checkhosts($conn, ['ns1.metaregistrar.com', 'ns2.metaregistrar.com', 'ns3.metaregistrar.com']); //echo "Creating contact\n"; //$contactid = createcontact($conn, '*****@*****.**','+35.8401231234','Department' ,'Metaregistrar' ,'Zuidelijk Halfrond 1' ,'8201 DD' , 'Gouda', 'NL'); $registrant = 'C5525'; $admin = 'C2526'; $tech = 'C4529'; echo "Creating domain\n";
case 3: case 4: $benefits = "eeeeeeeeeee"; break; default: $benefits = "None"; } echo $benefits, "<br />"; $test1 = "Hello"; echo $test1, "<br />"; $test1 .= " World"; echo $test1, "<br />"; echo "**************************<br />"; function checkbalance($balance) { if ($balance < 1000) { echo 1111111111, "<br />"; throw new Exception("bbbbbbbb"); throw new Exception("aaaaaaaaaaaa"); throw new Exception("Balance is less than 1000"); } else { echo 2222222; } } try { checkbalance(999); } catch (Exception $e) { echo $e->getMessage(); } finally { echo "<br />", 66666, "<br />"; }