zimbraAddressCheck.php 499 B

1234567891011121314151617
  1. <?php
  2. define("CLIENTAREA", true);
  3. require_once(__DIR__ . '/../../../init.php');
  4. require_once(ROOTDIR . '/includes/dbfunctions.php');
  5. require_once dirname(__FILE__) . '/zimbraSingle.inc';
  6. $allowed_host = 'admin.seecure.ch';
  7. $host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
  8. if(substr($host, 0 - strlen($allowed_host)) != $allowed_host) {
  9. die("This file cannot be accessed directly");
  10. }
  11. if(zimbraSingleDoesEMailExist($_GET['name'], $_GET['domain'])) {
  12. echo 'no';
  13. } else {
  14. echo 'yes';
  15. }