import.php 763 B

123456789101112131415161718192021222324252627
  1. <?php
  2. header('Access-Control-Allow-Origin: *');
  3. header('Cache-Control: no-cache, must-revalidate');
  4. header('Content-type: application/json');
  5. require_once (dirname(__FILE__). "/ImportController.php");
  6. $database['connect'] = 'mysql:host=localhost;dbname=tasks';
  7. $database['user'] = 'root';
  8. $database['password'] = 'gc01mysql';
  9. $imap['server'] = "{imap.1und1.de:993/imap/ssl}INBOX";
  10. $imap['user'] = "status@global-cube.de";
  11. $imap['password'] = "(6QNLU=7m3R?f2?6]JO4WH(K";
  12. ob_start();
  13. $importCtrl = new ImportController($database, $imap);
  14. $importCtrl->Workflow();
  15. $result = ob_get_contents();
  16. if (trim($result) != "") {
  17. file_put_contents(dirname(__FILE__)."/logs/import_".date("Ymd_His").".log", $result);
  18. }
  19. ob_end_clean();
  20. if ($importCtrl->fail) {
  21. die(23);
  22. }