/* * This script polls for new messages in the EPP system * The messages tell you if a domain name was transferred away to another provider * Or it tells you that your credit balance is low * Please use the pollack function to acknowledge a message and remove it from the queue */ $domainname = 'test.org'; try { echo "Polling for messages\n"; $conn = new Metaregistrar\EPP\metaregEppConnection(); $conn->setConnectionDetails(''); // Connect to the EPP server if ($conn->login()) { $messageid = poll($conn); if ($messageid) { transferconfirm($conn, $domainname); pollack($conn, $messageid); } $conn->logout(); } } catch (Metaregistrar\EPP\eppException $e) { echo "ERROR: " . $e->getMessage() . "\n\n"; } /** * @param $conn Metaregistrar\EPP\eppConnection * @return null */ function poll($conn) { try { $poll = new Metaregistrar\EPP\eppPollRequest(Metaregistrar\EPP\eppPollRequest::POLL_REQ, 0);
require '../autoloader.php'; /* * This script polls for new messages in the EPP system * The messages tell you if a domain name was transferred away to another provider * Or it tells you that your credit balance is low * Please use the pollack function to acknowledge a message and remove it from the queue */ try { echo "Polling for messages\n"; $conn = new Metaregistrar\EPP\metaregEppConnection(); // Connect to the EPP server if ($conn->connect()) { if (login($conn)) { $messageid = poll($conn); if ($messageid) { transferconfirm($conn, 'containerhuren.amsterdam'); pollack($conn, $messageid); } logout($conn); } } } catch (Metaregistrar\EPP\eppException $e) { echo "ERROR: " . $e->getMessage() . "\n\n"; } /** * @param $conn Metaregistrar\EPP\eppConnection * @return null */ function poll($conn) { try {