Automatically exported from code.google.com/p/planningalerts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
710 B

  1. <?php
  2. //includes
  3. require_once('config.php');
  4. require_once('application_parser.php');
  5. require_once('mailer.php');
  6. if (!isset($_GET['action'])){
  7. print "nothing to see here.";
  8. }else{
  9. echo "starting action " . $_GET['action'];
  10. }
  11. $action = $_GET['action'];
  12. if($action == "scrape"){
  13. //Launch the parser
  14. $application_parser = new application_parser();
  15. $application_parser->date = getdate(strtotime("-" . SCRAPE_DELAY . " days"));
  16. $application_parser->run();
  17. }
  18. if ($action == "mail"){
  19. //Launch the mailer
  20. $mailer = new mailer();
  21. $mailer->run();
  22. }
  23. ?>