From 381a6759d9672a88580c6bed715426839ae71454 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Wed, 3 Sep 2008 23:35:04 +0000 Subject: [PATCH] Fix Wealden scraper to use tempnam. I'm a bit shocked at how bad tempnam is, but there we go... --- trunk/docs/scrapers/wealden.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/docs/scrapers/wealden.php b/trunk/docs/scrapers/wealden.php index 3763ba0..32bd5a0 100644 --- a/trunk/docs/scrapers/wealden.php +++ b/trunk/docs/scrapers/wealden.php @@ -8,7 +8,11 @@ // 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 -$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 $day = (isset($_GET['day']) && !empty($_GET['day']) && $_GET['day'] > 0 && $_GET['day'] < 32) ? $_GET['day'] : 1;