Re: Re: Script to Fetch Elephpants

From: Date: Fri, 16 Sep 2011 03:34:26 +0000
Subject: Re: Re: Script to Fetch Elephpants
References: 1 2  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-12193@lists.php.net to get a copy of this message
On 2011-09-14, at 11:57 PM, Hannes Magnusson wrote: > Is url_sq guaranteed never to contain urlencoded paths, or > non-windows-friendly-filenames? > I doubt we have any Windows mirrors though.. but who knows. > > I notice you never cleanup the fetched images, so we will quickly have > bucketload of images.. maybe thats the idea - then we can shuffle them > on the mirrors? > > Its also missing sanitychecks around the file_get_contents() for the > json data, and ensuring $decoded actually contains anything before > overwriting photos.json. > Same when fetching the file, it needs to verify it actually fetched something. > ..And maybe check if the file already exists before overwriting it? Thanks for the review Hannes. These are all good points. I will update the script and repost. Cheers, Stew

« previous php.webmaster (#12193) next »