Automatically exported from code.google.com/p/planningalerts
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

47 行
1.5 KiB

  1. <?php
  2. //Includes
  3. require_once('config.php');
  4. require_once('application.php');
  5. //build date url
  6. $current_date = getdate();
  7. $day = $current_date['mday'] -5;
  8. $month = $current_date['mon'];
  9. $year = $current_date['year'];
  10. //if any get params were passed, overwrite the default date
  11. if (isset($_GET['day'])){
  12. $day = $_GET['day'];
  13. }
  14. if (isset($_GET['month'])){
  15. $month = $_GET['month'];
  16. }
  17. if (isset($_GET['year'])){
  18. $year = $_GET['year'];
  19. }
  20. //search url
  21. $search_url = "https://www.islington.gov.uk/onlineplanning/apas/run/Wphappcriteria.showApplications?decfromdate=#daterange&dectodate=#daterange";
  22. $date_range = "{$day}-{$month}-{$year}";
  23. $search_url = str_replace("#daterange", $date_range, $search_url);
  24. //comment and info urls
  25. $info_url_base = "https://www.islington.gov.uk/onlineplanning/apas/run/WPHAPPDETAIL.DisplayUrl?theApnID=";
  26. $comment_url_base = "http://www.blaby.gov.uk/publicaccess/dc/DcApplication/application_comments_entryform.aspx?caseno=";
  27. //grab urls
  28. $applications = scrape_applications_islington($search_url, $info_url_base, $comment_url_base);
  29. //comment and info urls
  30. $info_url_base = "http://www.blaby.gov.uk/publicaccess/dc/DcApplication/application_detailview.aspx?caseno=";
  31. $comment_url_base = "http://www.blaby.gov.uk/publicaccess/dc/DcApplication/application_comments_entryform.aspx?caseno=";
  32. print_r($applications);
  33. //Display applications
  34. // display_applications($applications, "Balby District Council", "Balby");
  35. ?>