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.

cityoflondon.php 1.1 KiB

18 年之前
18 年之前
18 年之前
18 年之前
18 年之前
1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. //Includes
  3. require_once('config.php');
  4. require_once('application.php');
  5. if (isset($_GET['day'])){
  6. $day = $_GET['day'];
  7. }
  8. if (isset($_GET['month'])){
  9. $month = $_GET['month'];
  10. }
  11. if (isset($_GET['year'])){
  12. $year = $_GET['year'];
  13. }
  14. //search url
  15. $search_url = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_searchresults.aspx?searchtype=WEEKLY&selWeeklyListRange=#daterange&weektype=VAL";
  16. $date_range = "{$day}%2F{$month}%2F{$year}%7C{$day}%2F{$month}%2F{$year}";
  17. $search_url = str_replace("#daterange", $date_range, $search_url);
  18. //comment and info urls
  19. $info_url_base = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_detailview.aspx?caseno=";
  20. $comment_url_base = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_comments_entryform.aspx?caseno=";
  21. //grab urls
  22. $applications = scrape_applications_publicaccess($search_url, $info_url_base, $comment_url_base);
  23. //Display applications
  24. display_applications($applications, "The City of London", "The City of London");
  25. ?>