Browse Source

Fix Wealden scraper to use tempnam. I'm a bit shocked at how bad tempnam is, but there we go...

master
duncan.parkes 16 years ago
parent
commit
870637743a
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      docs/scrapers/wealden.php

+ 5
- 1
docs/scrapers/wealden.php View File

@@ -8,7 +8,11 @@
// to get all the data add 'all=true' to the end of the query string // to get all the data add 'all=true' to the end of the query string
// //
// You need to set the location of the 'cookie jar' for the scraper to work // You need to set the location of the 'cookie jar' for the scraper to work
$cookiejar = '/tmp/wealden_cookies.txt';

// This is truly horrible - the tempnam function can't be called without
// the arguments in order to get the system temporary directory, but it falls
// back on it if the first argument doesn't exist - Duncan
$cookiejar = tempnam('nonexistantdirectory', '');


//Check a day is set and is valid //Check a day is set and is valid
$day = (isset($_GET['day']) && !empty($_GET['day']) && $_GET['day'] > 0 && $_GET['day'] < 32) ? $_GET['day'] : 1; $day = (isset($_GET['day']) && !empty($_GET['day']) && $_GET['day'] > 0 && $_GET['day'] < 32) ? $_GET['day'] : 1;


Loading…
Cancel
Save