public function checkcnameAction() { if ($this->getRequest()->isPost()) { try { $code = 1; $application = $this->getApplication(); if ($application->getDomain() and Core_Model_Url::checkCname($application->getDomain())) { $code = 0; } } catch (Exception $e) { $code = 1; } $html = Zend_Json::encode(array('code' => $code)); $this->getLayout()->setHtml($html); } }
public function checkcnameAction() { if ($this->getRequest()->isPost()) { try { $code = 1; $application = $this->getApplication(); if ($application->getDomain() and Core_Model_Url::checkCname($application->getDomain(), $this->getRequest()->getServer('SERVER_ADDR'))) { $code = 0; } } catch (Exception $e) { Zend_Debug::dump($e->getMessage()); die; } $html = Zend_Json::encode(array('code' => $code)); $this->getLayout()->setHtml($html); } }